| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 68b5cf8 commit 17eea18
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -263,8 +263,16 @@ void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) { | |||
| 263 | 263 | auto* allow_wasm_codegen_cb = s.allow_wasm_code_generation_callback ? | |
| 264 | 264 | s.allow_wasm_code_generation_callback : AllowWasmCodeGenerationCallback; | |
| 265 | 265 | isolate->SetAllowWasmCodeGenerationCallback(allow_wasm_codegen_cb); | |
| 266 | + | ||
| 267 | + auto* modify_code_generation_from_strings_callback = | ||
| 268 | + ModifyCodeGenerationFromStrings; | ||
| 269 | + if (s.flags & ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK && | ||
| 270 | + s.modify_code_generation_from_strings_callback) { | ||
| 271 | + modify_code_generation_from_strings_callback = | ||
| 272 | + s.modify_code_generation_from_strings_callback; | ||
| 273 | + } | ||
| 266 | 274 | isolate->SetModifyCodeGenerationFromStringsCallback( | |
| 267 | - ModifyCodeGenerationFromStrings); | ||
| 275 | + modify_code_generation_from_strings_callback); | ||
| 268 | 276 | ||
| 269 | 277 | Mutex::ScopedLock lock(node::per_process::cli_options_mutex); | |
| 270 | 278 | if (per_process::cli_options->get_per_isolate_options() | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -438,7 +438,8 @@ enum IsolateSettingsFlags { | |||
| 438 | 438 | MESSAGE_LISTENER_WITH_ERROR_LEVEL = 1 << 0, | |
| 439 | 439 | DETAILED_SOURCE_POSITIONS_FOR_PROFILING = 1 << 1, | |
| 440 | 440 | SHOULD_NOT_SET_PROMISE_REJECTION_CALLBACK = 1 << 2, | |
| 441 | - SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK = 1 << 3 | ||
| 441 | + SHOULD_NOT_SET_PREPARE_STACK_TRACE_CALLBACK = 1 << 3, | ||
| 442 | + ALLOW_MODIFY_CODE_GENERATION_FROM_STRINGS_CALLBACK = 1 << 4, | ||
| 442 | 443 | }; | |
| 443 | 444 | ||
| 444 | 445 | struct IsolateSettings { | |
@@ -456,6 +457,8 @@ struct IsolateSettings { | |||
| 456 | 457 | v8::PromiseRejectCallback promise_reject_callback = nullptr; | |
| 457 | 458 | v8::AllowWasmCodeGenerationCallback | |
| 458 | 459 | allow_wasm_code_generation_callback = nullptr; | |
| 460 | + v8::ModifyCodeGenerationFromStringsCallback2 | ||
| 461 | + modify_code_generation_from_strings_callback = nullptr; | ||
| 459 | 462 | }; | |
| 460 | 463 | ||
| 461 | 464 | // Overriding IsolateSettings may produce unexpected behavior | |
| Back | FazBrowse Home | New Git URL |
0 commit comments