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

Unified Diff: src/pending-compilation-error-handler.cc

Issue 1005063002: Strawman: check strong mode free variables against the global object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arrow func param fix Created 5 years, 9 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 | « src/pending-compilation-error-handler.h ('k') | src/scopeinfo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pending-compilation-error-handler.cc
diff --git a/src/pending-compilation-error-handler.cc b/src/pending-compilation-error-handler.cc
index 230b8767924d37ecb2034c294b843da2fb9efc14..f0449d82a90ce4a026ca958012760bc2faf95299 100644
--- a/src/pending-compilation-error-handler.cc
+++ b/src/pending-compilation-error-handler.cc
@@ -17,7 +17,7 @@ void PendingCompilationErrorHandler::ThrowPendingError(Isolate* isolate,
if (!has_pending_error_) return;
MessageLocation location(script, start_position_, end_position_);
Factory* factory = isolate->factory();
- bool has_arg = arg_ != NULL || char_arg_ != NULL;
+ bool has_arg = arg_ != NULL || char_arg_ != NULL || !handle_arg_.is_null();
Handle<FixedArray> elements = factory->NewFixedArray(has_arg ? 1 : 0);
if (arg_ != NULL) {
Handle<String> arg_string = arg_->string();
@@ -26,6 +26,8 @@ void PendingCompilationErrorHandler::ThrowPendingError(Isolate* isolate,
Handle<String> arg_string =
factory->NewStringFromUtf8(CStrVector(char_arg_)).ToHandleChecked();
elements->set(0, *arg_string);
+ } else if (!handle_arg_.is_null()) {
+ elements->set(0, *handle_arg_);
}
isolate->debug()->OnCompileError(script);
« no previous file with comments | « src/pending-compilation-error-handler.h ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698