| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c70b2f7 commit d750a3c
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -339,8 +339,7 @@ MaybeLocal<Module> ModuleWrap::CompileSourceTextModule( | |||
| 339 | 339 | bool* cache_rejected) { | |
| 340 | 340 | Isolate* isolate = realm->isolate(); | |
| 341 | 341 | EscapableHandleScope scope(isolate); | |
| 342 | - ScriptOrigin origin(isolate, | ||
| 343 | - url, | ||
| 342 | + ScriptOrigin origin(url, | ||
| 344 | 343 | line_offset, | |
| 345 | 344 | column_offset, | |
| 346 | 345 | true, // is cross origin | |
@@ -549,7 +548,6 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo<Value>& args) { | |||
| 549 | 548 | ||
| 550 | 549 | ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env()); | |
| 551 | 550 | TryCatchScope try_catch(realm->env()); | |
| 552 | - Isolate::SafeForTerminationScope safe_for_termination(isolate); | ||
| 553 | 551 | ||
| 554 | 552 | bool timed_out = false; | |
| 555 | 553 | bool received_signal = false; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -265,7 +265,7 @@ MaybeLocal<Function> BuiltinLoader::LookupAndCompileInternal( | |||
| 265 | 265 | std::string filename_s = std::string("node:") + id; | |
| 266 | 266 | Local<String> filename = | |
| 267 | 267 | OneByteString(isolate, filename_s.c_str(), filename_s.size()); | |
| 268 | - ScriptOrigin origin(isolate, filename, 0, 0, true); | ||
| 268 | + ScriptOrigin origin(filename, 0, 0, true); | ||
| 269 | 269 | ||
| 270 | 270 | BuiltinCodeCacheData cached_data{}; | |
| 271 | 271 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -886,16 +886,15 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) { | |||
| 886 | 886 | host_defined_options->Set( | |
| 887 | 887 | isolate, loader::HostDefinedOptions::kID, id_symbol); | |
| 888 | 888 | ||
| 889 | - ScriptOrigin origin(isolate, | ||
| 890 | - filename, | ||
| 891 | - line_offset, // line offset | ||
| 892 | - column_offset, // column offset | ||
| 893 | - true, // is cross origin | ||
| 894 | - -1, // script id | ||
| 895 | - Local<Value>(), // source map URL | ||
| 896 | - false, // is opaque (?) | ||
| 897 | - false, // is WASM | ||
| 898 | - false, // is ES Module | ||
| 889 | + ScriptOrigin origin(filename, | ||
| 890 | + line_offset, // line offset | ||
| 891 | + column_offset, // column offset | ||
| 892 | + true, // is cross origin | ||
| 893 | + -1, // script id | ||
| 894 | + Local<Value>(), // source map URL | ||
| 895 | + false, // is opaque (?) | ||
| 896 | + false, // is WASM | ||
| 897 | + false, // is ES Module | ||
| 899 | 898 | host_defined_options); | |
| 900 | 899 | ScriptCompiler::Source source(code, origin, cached_data); | |
| 901 | 900 | ScriptCompiler::CompileOptions compile_options = | |
@@ -1006,7 +1005,7 @@ MaybeLocal<Function> CompileFunction(Local<Context> context, | |||
| 1006 | 1005 | Local<String> filename, | |
| 1007 | 1006 | Local<String> content, | |
| 1008 | 1007 | std::vector<Local<String>>* parameters) { | |
| 1009 | - ScriptOrigin script_origin(context->GetIsolate(), filename, 0, 0, true); | ||
| 1008 | + ScriptOrigin script_origin(filename, 0, 0, true); | ||
| 1010 | 1009 | ScriptCompiler::Source script_source(content, script_origin); | |
| 1011 | 1010 | ||
| 1012 | 1011 | return ScriptCompiler::CompileFunction(context, | |
@@ -1116,7 +1115,6 @@ bool ContextifyScript::EvalMachine(Local<Context> context, | |||
| 1116 | 1115 | } | |
| 1117 | 1116 | ||
| 1118 | 1117 | TryCatchScope try_catch(env); | |
| 1119 | - Isolate::SafeForTerminationScope safe_for_termination(env->isolate()); | ||
| 1120 | 1118 | ContextifyScript* wrapped_script; | |
| 1121 | 1119 | ASSIGN_OR_RETURN_UNWRAP(&wrapped_script, args.Holder(), false); | |
| 1122 | 1120 | Local<UnboundScript> unbound_script = | |
@@ -1270,8 +1268,7 @@ void ContextifyContext::CompileFunction( | |||
| 1270 | 1268 | Local<PrimitiveArray> host_defined_options = | |
| 1271 | 1269 | loader::ModuleWrap::GetHostDefinedOptions(isolate, id_symbol); | |
| 1272 | 1270 | ||
| 1273 | - ScriptOrigin origin(isolate, | ||
| 1274 | - filename, | ||
| 1271 | + ScriptOrigin origin(filename, | ||
| 1275 | 1272 | line_offset, // line offset | |
| 1276 | 1273 | column_offset, // column offset | |
| 1277 | 1274 | true, // is cross origin | |
@@ -1452,8 +1449,7 @@ static MaybeLocal<Function> CompileFunctionForCJSLoader(Environment* env, | |||
| 1452 | 1449 | Local<Symbol> symbol = env->vm_dynamic_import_default_internal(); | |
| 1453 | 1450 | Local<PrimitiveArray> hdo = | |
| 1454 | 1451 | loader::ModuleWrap::GetHostDefinedOptions(isolate, symbol); | |
| 1455 | - ScriptOrigin origin(isolate, | ||
| 1456 | - filename, | ||
| 1452 | + ScriptOrigin origin(filename, | ||
| 1457 | 1453 | 0, // line offset | |
| 1458 | 1454 | 0, // column offset | |
| 1459 | 1455 | true, // is cross origin | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -620,12 +620,9 @@ TEST_F(EnvironmentTest, SetImmediateMicrotasks) { | |||
| 620 | 620 | ||
| 621 | 621 | #ifndef _WIN32 // No SIGINT on Windows. | |
| 622 | 622 | TEST_F(NodeZeroIsolateTestFixture, CtrlCWithOnlySafeTerminationTest) { | |
| 623 | - // We need to go through the whole setup dance here because we want to | ||
| 624 | - // set only_terminate_in_safe_scope. | ||
| 625 | 623 | // Allocate and initialize Isolate. | |
| 626 | 624 | v8::Isolate::CreateParams create_params; | |
| 627 | 625 | create_params.array_buffer_allocator = allocator.get(); | |
| 628 | - create_params.only_terminate_in_safe_scope = true; | ||
| 629 | 626 | v8::Isolate* isolate = v8::Isolate::Allocate(); | |
| 630 | 627 | CHECK_NOT_NULL(isolate); | |
| 631 | 628 | platform->RegisterIsolate(isolate, ¤t_loop); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments