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

Unified Diff: src/debug/debug-evaluate.cc

Issue 2747243006: [debug] whitelist Object and Symbol builtins for debug-evaluate. (Closed)
Patch Set: Created 3 years, 9 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 | test/debugger/debug/debug-evaluate-no-side-effect-builtins.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug-evaluate.cc
diff --git a/src/debug/debug-evaluate.cc b/src/debug/debug-evaluate.cc
index bb9a99e5c94bc2867caf1a1725948456159ed45f..9fcd652662c63304cff7f14a00b50d2a84e736b0 100644
--- a/src/debug/debug-evaluate.cc
+++ b/src/debug/debug-evaluate.cc
@@ -315,6 +315,7 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
case Runtime::kCall:
case Runtime::kInlineMaxSmi:
case Runtime::kMaxSmi:
+ case Runtime::kHasInPrototypeChain:
return true;
default:
if (FLAG_trace_side_effect_free_debug_evaluate) {
@@ -379,6 +380,7 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
// Conversions.
case Bytecode::kToObject:
case Bytecode::kToNumber:
+ case Bytecode::kToName:
// Misc.
case Bytecode::kForInPrepare:
case Bytecode::kForInContinue:
@@ -405,7 +407,22 @@ bool BuiltinHasNoSideEffect(Builtins::Name id) {
switch (id) {
// Whitelist for builtins.
// Object builtins.
+ case Builtins::kObjectCreate:
+ case Builtins::kObjectEntries:
+ case Builtins::kObjectGetOwnPropertyDescriptor:
+ case Builtins::kObjectGetOwnPropertyDescriptors:
+ case Builtins::kObjectGetOwnPropertyNames:
+ case Builtins::kObjectGetOwnPropertySymbols:
+ case Builtins::kObjectGetPrototypeOf:
+ case Builtins::kObjectIs:
+ case Builtins::kObjectIsExtensible:
+ case Builtins::kObjectIsFrozen:
+ case Builtins::kObjectIsSealed:
case Builtins::kObjectPrototypeValueOf:
+ case Builtins::kObjectValues:
+ case Builtins::kObjectHasOwnProperty:
+ case Builtins::kObjectPrototypePropertyIsEnumerable:
+ case Builtins::kObjectProtoToString:
// Array builtins.
case Builtins::kArrayCode:
case Builtins::kArrayIndexOf:
@@ -485,6 +502,12 @@ bool BuiltinHasNoSideEffect(Builtins::Name id) {
case Builtins::kStringPrototypeTrimLeft:
case Builtins::kStringPrototypeTrimRight:
case Builtins::kStringPrototypeValueOf:
+ // Symbol builtins.
+ case Builtins::kSymbolConstructor:
+ case Builtins::kSymbolKeyFor:
+ case Builtins::kSymbolPrototypeToString:
+ case Builtins::kSymbolPrototypeValueOf:
+ case Builtins::kSymbolPrototypeToPrimitive:
// JSON builtins.
case Builtins::kJsonParse:
case Builtins::kJsonStringify:
« no previous file with comments | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect-builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698