OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2208 size_t context_extension_count, Local<Object> context_extensions[]) { | 2208 size_t context_extension_count, Local<Object> context_extensions[]) { |
2209 RETURN_TO_LOCAL_UNCHECKED( | 2209 RETURN_TO_LOCAL_UNCHECKED( |
2210 CompileFunctionInContext(v8_context, source, arguments_count, arguments, | 2210 CompileFunctionInContext(v8_context, source, arguments_count, arguments, |
2211 context_extension_count, context_extensions), | 2211 context_extension_count, context_extensions), |
2212 Function); | 2212 Function); |
2213 } | 2213 } |
2214 | 2214 |
2215 | 2215 |
2216 ScriptCompiler::ScriptStreamingTask* ScriptCompiler::StartStreamingScript( | 2216 ScriptCompiler::ScriptStreamingTask* ScriptCompiler::StartStreamingScript( |
2217 Isolate* v8_isolate, StreamedSource* source, CompileOptions options) { | 2217 Isolate* v8_isolate, StreamedSource* source, CompileOptions options) { |
| 2218 if (!i::FLAG_script_streaming) { |
| 2219 return nullptr; |
| 2220 } |
2218 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 2221 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
2219 return new i::BackgroundParsingTask(source->impl(), options, | 2222 return new i::BackgroundParsingTask(source->impl(), options, |
2220 i::FLAG_stack_size, isolate); | 2223 i::FLAG_stack_size, isolate); |
2221 } | 2224 } |
2222 | 2225 |
2223 | 2226 |
2224 MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context, | 2227 MaybeLocal<Script> ScriptCompiler::Compile(Local<Context> context, |
2225 StreamedSource* v8_source, | 2228 StreamedSource* v8_source, |
2226 Local<String> full_source_string, | 2229 Local<String> full_source_string, |
2227 const ScriptOrigin& origin) { | 2230 const ScriptOrigin& origin) { |
(...skipping 7136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9364 Address callback_address = | 9367 Address callback_address = |
9365 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9368 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9366 VMState<EXTERNAL> state(isolate); | 9369 VMState<EXTERNAL> state(isolate); |
9367 ExternalCallbackScope call_scope(isolate, callback_address); | 9370 ExternalCallbackScope call_scope(isolate, callback_address); |
9368 callback(info); | 9371 callback(info); |
9369 } | 9372 } |
9370 | 9373 |
9371 | 9374 |
9372 } // namespace internal | 9375 } // namespace internal |
9373 } // namespace v8 | 9376 } // namespace v8 |
OLD | NEW |