Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: src/api.cc

Issue 1704223002: Remove strong mode support from Scope and Variable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove test-parsing test Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/ast/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index b7dcd446c154e9d232ada47575fe5c227775e07a..f914892a459f260ad4d16ee0c203e6a235359b4f 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -1603,32 +1603,7 @@ Local<Script> UnboundScript::BindToCurrentContext() {
function_info(i::SharedFunctionInfo::cast(*obj), obj->GetIsolate());
i::Isolate* isolate = obj->GetIsolate();
- i::ScopeInfo* scope_info = function_info->scope_info();
i::Handle<i::JSReceiver> global(isolate->native_context()->global_object());
- for (int i = 0; i < scope_info->StrongModeFreeVariableCount(); ++i) {
- i::Handle<i::String> name_string(scope_info->StrongModeFreeVariableName(i));
- i::ScriptContextTable::LookupResult result;
- i::Handle<i::ScriptContextTable> script_context_table(
- isolate->native_context()->script_context_table());
- if (!i::ScriptContextTable::Lookup(script_context_table, name_string,
- &result)) {
- i::Handle<i::Name> name(scope_info->StrongModeFreeVariableName(i));
- Maybe<bool> has = i::JSReceiver::HasProperty(global, name);
- if (has.IsJust() && !has.FromJust()) {
- i::PendingCompilationErrorHandler pending_error_handler_;
- pending_error_handler_.ReportMessageAt(
- scope_info->StrongModeFreeVariableStartPosition(i),
- scope_info->StrongModeFreeVariableEndPosition(i),
- i::MessageTemplate::kStrongUnboundGlobal, name_string,
- i::kReferenceError);
- i::Handle<i::Script> script(i::Script::cast(function_info->script()));
- pending_error_handler_.ThrowPendingError(isolate, script);
- isolate->ReportPendingMessages();
- isolate->OptionalRescheduleException(true);
- return Local<Script>();
- }
- }
- }
i::Handle<i::JSFunction> function =
obj->GetIsolate()->factory()->NewFunctionFromSharedFunctionInfo(
function_info, isolate->native_context());
« no previous file with comments | « no previous file | src/ast/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698