summaryrefslogtreecommitdiff
path: root/chromium/v8/src/debug/debug-evaluate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/debug/debug-evaluate.cc')
-rw-r--r--chromium/v8/src/debug/debug-evaluate.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/chromium/v8/src/debug/debug-evaluate.cc b/chromium/v8/src/debug/debug-evaluate.cc
index 0d8a7b2c7e6..203885143fa 100644
--- a/chromium/v8/src/debug/debug-evaluate.cc
+++ b/chromium/v8/src/debug/debug-evaluate.cc
@@ -101,11 +101,14 @@ MaybeHandle<Object> DebugEvaluate::WithTopmostArguments(Isolate* isolate,
.Check();
// Materialize receiver.
- Handle<String> this_str = factory->this_string();
- JSObject::SetOwnPropertyIgnoreAttributes(
- materialized, this_str, Handle<Object>(it.frame()->receiver(), isolate),
- NONE)
- .Check();
+ Handle<Object> this_value(it.frame()->receiver(), isolate);
+ DCHECK_EQ(it.frame()->IsConstructor(), this_value->IsTheHole(isolate));
+ if (!this_value->IsTheHole(isolate)) {
+ Handle<String> this_str = factory->this_string();
+ JSObject::SetOwnPropertyIgnoreAttributes(materialized, this_str, this_value,
+ NONE)
+ .Check();
+ }
// Use extension object in a debug-evaluate scope.
Handle<ScopeInfo> scope_info =
@@ -383,6 +386,7 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
case Bytecode::kLdaKeyedProperty:
case Bytecode::kLdaGlobalInsideTypeof:
case Bytecode::kLdaLookupSlotInsideTypeof:
+ case Bytecode::kGetIterator:
// Arithmetics.
case Bytecode::kAdd:
case Bytecode::kAddSmi: