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

Side by Side Diff: src/debug/debug-evaluate.cc

Issue 1854713002: Correctly annotate eval origin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/debug-frames.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/debug/debug-evaluate.h" 5 #include "src/debug/debug-evaluate.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/debug/debug.h" 9 #include "src/debug/debug.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 Isolate* isolate, Handle<SharedFunctionInfo> outer_info, 88 Isolate* isolate, Handle<SharedFunctionInfo> outer_info,
89 Handle<Context> context, Handle<HeapObject> context_extension, 89 Handle<Context> context, Handle<HeapObject> context_extension,
90 Handle<Object> receiver, Handle<String> source) { 90 Handle<Object> receiver, Handle<String> source) {
91 if (context_extension->IsJSObject()) { 91 if (context_extension->IsJSObject()) {
92 Handle<JSObject> extension = Handle<JSObject>::cast(context_extension); 92 Handle<JSObject> extension = Handle<JSObject>::cast(context_extension);
93 Handle<JSFunction> closure(context->closure(), isolate); 93 Handle<JSFunction> closure(context->closure(), isolate);
94 context = isolate->factory()->NewWithContext(closure, context, extension); 94 context = isolate->factory()->NewWithContext(closure, context, extension);
95 } 95 }
96 96
97 Handle<JSFunction> eval_fun; 97 Handle<JSFunction> eval_fun;
98 ASSIGN_RETURN_ON_EXCEPTION(isolate, eval_fun, 98 ASSIGN_RETURN_ON_EXCEPTION(
99 Compiler::GetFunctionFromEval( 99 isolate, eval_fun,
100 source, outer_info, context, SLOPPY, 100 Compiler::GetFunctionFromEval(
101 NO_PARSE_RESTRICTION, RelocInfo::kNoPosition), 101 source, outer_info, context, SLOPPY, NO_PARSE_RESTRICTION,
102 Object); 102 RelocInfo::kNoPosition, RelocInfo::kNoPosition),
103 Object);
103 104
104 Handle<Object> result; 105 Handle<Object> result;
105 ASSIGN_RETURN_ON_EXCEPTION( 106 ASSIGN_RETURN_ON_EXCEPTION(
106 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), 107 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL),
107 Object); 108 Object);
108 109
109 // Skip the global proxy as it has no properties and always delegates to the 110 // Skip the global proxy as it has no properties and always delegates to the
110 // real global object. 111 // real global object.
111 if (result->IsJSGlobalProxy()) { 112 if (result->IsJSGlobalProxy()) {
112 PrototypeIterator iter(isolate, Handle<JSGlobalProxy>::cast(result)); 113 PrototypeIterator iter(isolate, Handle<JSGlobalProxy>::cast(result));
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 // referenced by the current function, so it can be correctly resolved. 249 // referenced by the current function, so it can be correctly resolved.
249 return; 250 return;
250 } else if (local_function->shared()->scope_info()->HasReceiver()) { 251 } else if (local_function->shared()->scope_info()->HasReceiver()) {
251 recv = handle(frame_->receiver(), isolate_); 252 recv = handle(frame_->receiver(), isolate_);
252 } 253 }
253 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); 254 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check();
254 } 255 }
255 256
256 } // namespace internal 257 } // namespace internal
257 } // namespace v8 258 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.cc ('k') | src/debug/debug-frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698