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

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

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master 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 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 void DebugEvaluate::ContextBuilder::MaterializeReceiver( 243 void DebugEvaluate::ContextBuilder::MaterializeReceiver(
244 Handle<JSObject> target, Handle<Context> local_context, 244 Handle<JSObject> target, Handle<Context> local_context,
245 Handle<JSFunction> local_function, Handle<StringSet> non_locals) { 245 Handle<JSFunction> local_function, Handle<StringSet> non_locals) {
246 Handle<Object> recv = isolate_->factory()->undefined_value(); 246 Handle<Object> recv = isolate_->factory()->undefined_value();
247 Handle<String> name = isolate_->factory()->this_string(); 247 Handle<String> name = isolate_->factory()->this_string();
248 if (non_locals->Has(name)) { 248 if (non_locals->Has(name)) {
249 // 'this' is allocated in an outer context and is is already being 249 // 'this' is allocated in an outer context and is is already being
250 // referenced by the current function, so it can be correctly resolved. 250 // referenced by the current function, so it can be correctly resolved.
251 return; 251 return;
252 } else if (local_function->shared()->scope_info()->HasReceiver() && 252 } else if (local_function->shared()->scope_info()->HasReceiver() &&
253 !frame_->receiver()->IsTheHole()) { 253 !frame_->receiver()->IsTheHole(isolate_)) {
254 recv = handle(frame_->receiver(), isolate_); 254 recv = handle(frame_->receiver(), isolate_);
255 } 255 }
256 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check(); 256 JSObject::SetOwnPropertyIgnoreAttributes(target, name, recv, NONE).Check();
257 } 257 }
258 258
259 } // namespace internal 259 } // namespace internal
260 } // namespace v8 260 } // 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