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 2203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2214 script->set_column_offset( | 2214 script->set_column_offset( |
2215 static_cast<int>(origin.ResourceColumnOffset()->Value())); | 2215 static_cast<int>(origin.ResourceColumnOffset()->Value())); |
2216 } | 2216 } |
2217 script->set_origin_options(origin.Options()); | 2217 script->set_origin_options(origin.Options()); |
2218 if (!origin.SourceMapUrl().IsEmpty()) { | 2218 if (!origin.SourceMapUrl().IsEmpty()) { |
2219 script->set_source_mapping_url( | 2219 script->set_source_mapping_url( |
2220 *Utils::OpenHandle(*(origin.SourceMapUrl()))); | 2220 *Utils::OpenHandle(*(origin.SourceMapUrl()))); |
2221 } | 2221 } |
2222 | 2222 |
2223 source->info->set_script(script); | 2223 source->info->set_script(script); |
2224 source->info->set_context(isolate->native_context()); | |
2225 | 2224 |
2226 { | 2225 { |
2227 // Create a canonical handle scope if compiling ignition bytecode. This is | 2226 // Create a canonical handle scope if compiling ignition bytecode. This is |
2228 // required by the constant array builder to de-duplicate objects without | 2227 // required by the constant array builder to de-duplicate objects without |
2229 // dereferencing handles. | 2228 // dereferencing handles. |
2230 std::unique_ptr<i::CanonicalHandleScope> canonical; | 2229 std::unique_ptr<i::CanonicalHandleScope> canonical; |
2231 if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate)); | 2230 if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate)); |
2232 | 2231 |
2233 // Do the parsing tasks which need to be done on the main thread. This will | 2232 // Do the parsing tasks which need to be done on the main thread. This will |
2234 // also handle parse errors. | 2233 // also handle parse errors. |
(...skipping 7095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9330 Address callback_address = | 9329 Address callback_address = |
9331 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9330 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9332 VMState<EXTERNAL> state(isolate); | 9331 VMState<EXTERNAL> state(isolate); |
9333 ExternalCallbackScope call_scope(isolate, callback_address); | 9332 ExternalCallbackScope call_scope(isolate, callback_address); |
9334 callback(info); | 9333 callback(info); |
9335 } | 9334 } |
9336 | 9335 |
9337 | 9336 |
9338 } // namespace internal | 9337 } // namespace internal |
9339 } // namespace v8 | 9338 } // namespace v8 |
OLD | NEW |