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

Unified Diff: src/builtins.cc

Issue 2058733002: [liveedit]: fail to patch if target is outside of async function on stack (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix the CHECK failure, too Created 4 years, 6 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/debug/liveedit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 1aa886ac3e6428264c4ba99b2ab4bc14500a0ee0..28b5339bc0f3afc12f7e83e783c0b3075f8be9a7 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -4503,8 +4503,17 @@ BUILTIN(GeneratorFunctionConstructor) {
BUILTIN(AsyncFunctionConstructor) {
HandleScope scope(isolate);
- RETURN_RESULT_OR_FAILURE(
- isolate, CreateDynamicFunction(isolate, args, "async function"));
+ Handle<JSFunction> func;
+ ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
+ isolate, func, CreateDynamicFunction(isolate, args, "async function"));
+
+ // Do not lazily compute eval position for AsyncFunction, as they may not be
+ // determined after the function is resumed.
+ Handle<Script> script = handle(Script::cast(func->shared()->script()));
+ int position = script->GetEvalPosition();
+ USE(position);
Dan Ehrenberg 2016/06/14 16:36:01 Should we be doing this for generators as well? Ca
+
+ return *func;
}
// ES6 section 19.4.1.1 Symbol ( [ description ] ) for the [[Call]] case.
« no previous file with comments | « no previous file | src/debug/liveedit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698