diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/bindings.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/core/bindings.rs b/core/bindings.rs index 071d6e015..4b2c39881 100644 --- a/core/bindings.rs +++ b/core/bindings.rs @@ -1,7 +1,6 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. use crate::error::AnyError; -use crate::error::JsError; use crate::runtime::JsRuntimeState; use crate::JsRuntime; use crate::Op; @@ -35,9 +34,6 @@ lazy_static! { function: eval_context.map_fn_to() }, v8::ExternalReference { - function: format_error.map_fn_to() - }, - v8::ExternalReference { getter: shared_getter.map_fn_to() }, v8::ExternalReference { @@ -158,11 +154,6 @@ pub fn initialize_context<'s>( let eval_context_val = eval_context_tmpl.get_function(scope).unwrap(); core_val.set(scope, eval_context_key.into(), eval_context_val.into()); - let format_error_key = v8::String::new(scope, "formatError").unwrap(); - let format_error_tmpl = v8::FunctionTemplate::new(scope, format_error); - let format_error_val = format_error_tmpl.get_function(scope).unwrap(); - core_val.set(scope, format_error_key.into(), format_error_val.into()); - let encode_key = v8::String::new(scope, "encode").unwrap(); let encode_tmpl = v8::FunctionTemplate::new(scope, encode); let encode_val = encode_tmpl.get_function(scope).unwrap(); @@ -602,20 +593,6 @@ fn eval_context( rv.set(output.into()); } -fn format_error( - scope: &mut v8::HandleScope, - args: v8::FunctionCallbackArguments, - mut rv: v8::ReturnValue, -) { - let e = JsError::from_v8_exception(scope, args.get(0)); - let state_rc = JsRuntime::state(scope); - let state = state_rc.borrow(); - let e = (state.js_error_create_fn)(e); - let e = e.to_string(); - let e = v8::String::new(scope, &e).unwrap(); - rv.set(e.into()) -} - fn encode( scope: &mut v8::HandleScope, args: v8::FunctionCallbackArguments, |