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 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1773 v8::True(v8_isolate)); | 1773 v8::True(v8_isolate)); |
1774 } | 1774 } |
1775 source->info->set_script(script); | 1775 source->info->set_script(script); |
1776 source->info->SetContext(isolate->native_context()); | 1776 source->info->SetContext(isolate->native_context()); |
1777 | 1777 |
1778 EXCEPTION_PREAMBLE(isolate); | 1778 EXCEPTION_PREAMBLE(isolate); |
1779 | 1779 |
1780 // Do the parsing tasks which need to be done on the main thread. This will | 1780 // Do the parsing tasks which need to be done on the main thread. This will |
1781 // also handle parse errors. | 1781 // also handle parse errors. |
1782 source->parser->Internalize(); | 1782 source->parser->Internalize(); |
| 1783 source->parser->HandleSourceURLComments(); |
1783 | 1784 |
1784 i::Handle<i::SharedFunctionInfo> result = | 1785 i::Handle<i::SharedFunctionInfo> result = |
1785 i::Handle<i::SharedFunctionInfo>::null(); | 1786 i::Handle<i::SharedFunctionInfo>::null(); |
1786 if (source->info->function() != NULL) { | 1787 if (source->info->function() != NULL) { |
1787 // Parsing has succeeded. | 1788 // Parsing has succeeded. |
1788 result = | 1789 result = |
1789 i::Compiler::CompileStreamedScript(source->info.get(), str->length()); | 1790 i::Compiler::CompileStreamedScript(source->info.get(), str->length()); |
1790 } | 1791 } |
1791 has_pending_exception = result.is_null(); | 1792 has_pending_exception = result.is_null(); |
1792 if (has_pending_exception) isolate->ReportPendingMessages(); | 1793 if (has_pending_exception) isolate->ReportPendingMessages(); |
(...skipping 5969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7762 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7763 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7763 Address callback_address = | 7764 Address callback_address = |
7764 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7765 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7765 VMState<EXTERNAL> state(isolate); | 7766 VMState<EXTERNAL> state(isolate); |
7766 ExternalCallbackScope call_scope(isolate, callback_address); | 7767 ExternalCallbackScope call_scope(isolate, callback_address); |
7767 callback(info); | 7768 callback(info); |
7768 } | 7769 } |
7769 | 7770 |
7770 | 7771 |
7771 } } // namespace v8::internal | 7772 } } // namespace v8::internal |
OLD | NEW |