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 1542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 isolate->native_context()->script_context_table()); | 1553 isolate->native_context()->script_context_table()); |
1554 if (!i::ScriptContextTable::Lookup(script_context_table, name_string, | 1554 if (!i::ScriptContextTable::Lookup(script_context_table, name_string, |
1555 &result)) { | 1555 &result)) { |
1556 i::Handle<i::Name> name(scope_info->StrongModeFreeVariableName(i)); | 1556 i::Handle<i::Name> name(scope_info->StrongModeFreeVariableName(i)); |
1557 Maybe<bool> has = i::JSReceiver::HasProperty(global, name); | 1557 Maybe<bool> has = i::JSReceiver::HasProperty(global, name); |
1558 if (has.IsJust() && !has.FromJust()) { | 1558 if (has.IsJust() && !has.FromJust()) { |
1559 i::PendingCompilationErrorHandler pending_error_handler_; | 1559 i::PendingCompilationErrorHandler pending_error_handler_; |
1560 pending_error_handler_.ReportMessageAt( | 1560 pending_error_handler_.ReportMessageAt( |
1561 scope_info->StrongModeFreeVariableStartPosition(i), | 1561 scope_info->StrongModeFreeVariableStartPosition(i), |
1562 scope_info->StrongModeFreeVariableEndPosition(i), | 1562 scope_info->StrongModeFreeVariableEndPosition(i), |
1563 "strong_unbound_global", name_string, i::kReferenceError); | 1563 i::MessageTemplate::kStrongUnboundGlobal, name_string, |
| 1564 i::kReferenceError); |
1564 i::Handle<i::Script> script(i::Script::cast(function_info->script())); | 1565 i::Handle<i::Script> script(i::Script::cast(function_info->script())); |
1565 pending_error_handler_.ThrowPendingError(isolate, script); | 1566 pending_error_handler_.ThrowPendingError(isolate, script); |
1566 isolate->ReportPendingMessages(); | 1567 isolate->ReportPendingMessages(); |
1567 isolate->OptionalRescheduleException(true); | 1568 isolate->OptionalRescheduleException(true); |
1568 return Local<Script>(); | 1569 return Local<Script>(); |
1569 } | 1570 } |
1570 } | 1571 } |
1571 } | 1572 } |
1572 i::Handle<i::JSFunction> function = | 1573 i::Handle<i::JSFunction> function = |
1573 obj->GetIsolate()->factory()->NewFunctionFromSharedFunctionInfo( | 1574 obj->GetIsolate()->factory()->NewFunctionFromSharedFunctionInfo( |
(...skipping 6461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8035 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 8036 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
8036 Address callback_address = | 8037 Address callback_address = |
8037 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8038 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8038 VMState<EXTERNAL> state(isolate); | 8039 VMState<EXTERNAL> state(isolate); |
8039 ExternalCallbackScope call_scope(isolate, callback_address); | 8040 ExternalCallbackScope call_scope(isolate, callback_address); |
8040 callback(info); | 8041 callback(info); |
8041 } | 8042 } |
8042 | 8043 |
8043 | 8044 |
8044 } } // namespace v8::internal | 8045 } } // namespace v8::internal |
OLD | NEW |