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

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

Issue 2156303002: Implement new Function.prototype.toString and fix CreateDynamicFunction parsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years 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
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/compiler.h" 8 #include "src/compiler.h"
9 #include "src/contexts.h" 9 #include "src/contexts.h"
10 #include "src/debug/debug-frames.h" 10 #include "src/debug/debug-frames.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 ? Handle<ScopeInfo>::null() 101 ? Handle<ScopeInfo>::null()
102 : Handle<ScopeInfo>(context->scope_info())), 102 : Handle<ScopeInfo>(context->scope_info())),
103 extension); 103 extension);
104 } 104 }
105 105
106 Handle<JSFunction> eval_fun; 106 Handle<JSFunction> eval_fun;
107 ASSIGN_RETURN_ON_EXCEPTION( 107 ASSIGN_RETURN_ON_EXCEPTION(
108 isolate, eval_fun, 108 isolate, eval_fun,
109 Compiler::GetFunctionFromEval(source, outer_info, context, SLOPPY, 109 Compiler::GetFunctionFromEval(source, outer_info, context, SLOPPY,
110 NO_PARSE_RESTRICTION, kNoSourcePosition, 110 NO_PARSE_RESTRICTION, kNoSourcePosition,
111 kNoSourcePosition), 111 kNoSourcePosition, kNoSourcePosition),
112 Object); 112 Object);
113 113
114 Handle<Object> result; 114 Handle<Object> result;
115 ASSIGN_RETURN_ON_EXCEPTION( 115 ASSIGN_RETURN_ON_EXCEPTION(
116 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL), 116 isolate, result, Execution::Call(isolate, eval_fun, receiver, 0, NULL),
117 Object); 117 Object);
118 118
119 // Skip the global proxy as it has no properties and always delegates to the 119 // Skip the global proxy as it has no properties and always delegates to the
120 // real global object. 120 // real global object.
121 if (result->IsJSGlobalProxy()) { 121 if (result->IsJSGlobalProxy()) {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 return; 264 return;
265 } else if (local_function->shared()->scope_info()->HasReceiver() && 265 } else if (local_function->shared()->scope_info()->HasReceiver() &&
266 !frame_->receiver()->IsTheHole(isolate_)) { 266 !frame_->receiver()->IsTheHole(isolate_)) {
267 recv = handle(frame_->receiver(), isolate_); 267 recv = handle(frame_->receiver(), isolate_);
268 } 268 }
269 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); 269 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check();
270 } 270 }
271 271
272 } // namespace internal 272 } // namespace internal
273 } // namespace v8 273 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698