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

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

Issue 2680163005: [debugger] extend whitelist for side-effect free debug-evaluate. (Closed)
Patch Set: inspector API change got reverted Created 3 years, 10 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-control.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 b36d8a21abc873419b4e33f5285aceef1500619d..5b3eb879195a19764ca75f3b8fcb528475858770 100644
--- a/src/debug/debug-evaluate.cc
+++ b/src/debug/debug-evaluate.cc
@@ -269,10 +269,25 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
case Runtime::kInlineToString:
case Runtime::kToLength:
case Runtime::kInlineToLength:
+ // Type checks.
+ case Runtime::kIsJSReceiver:
+ case Runtime::kInlineIsJSReceiver:
+ case Runtime::kIsSmi:
+ case Runtime::kInlineIsSmi:
+ case Runtime::kIsArray:
+ case Runtime::kIsFunction:
+ case Runtime::kIsDate:
+ case Runtime::kIsJSProxy:
+ case Runtime::kIsRegExp:
+ case Runtime::kIsTypedArray:
// Loads.
case Runtime::kLoadLookupSlotForCall:
// Errors.
+ case Runtime::kReThrow:
case Runtime::kThrowReferenceError:
+ case Runtime::kThrowSymbolIteratorInvalid:
+ case Runtime::kThrowIteratorResultNotAnObject:
+ case Runtime::kNewTypeError:
// Strings.
case Runtime::kInlineStringCharCodeAt:
case Runtime::kStringCharCodeAt:
@@ -288,6 +303,7 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
case Runtime::kCreateObjectLiteral:
case Runtime::kCreateRegExpLiteral:
// Misc.
+ case Runtime::kForInPrepare:
case Runtime::kInlineCall:
case Runtime::kCall:
case Runtime::kInlineMaxSmi:
@@ -350,9 +366,18 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
case Bytecode::kCreateArrayLiteral:
case Bytecode::kCreateObjectLiteral:
case Bytecode::kCreateRegExpLiteral:
- // Misc.
+ // Allocations.
+ case Bytecode::kCreateClosure:
case Bytecode::kCreateUnmappedArguments:
+ // Conversions.
+ case Bytecode::kToObject:
+ // Misc.
+ case Bytecode::kForInPrepare:
+ case Bytecode::kForInContinue:
+ case Bytecode::kForInNext:
+ case Bytecode::kForInStep:
case Bytecode::kThrow:
+ case Bytecode::kReThrow:
case Bytecode::kIllegal:
case Bytecode::kCallJSRuntime:
case Bytecode::kStackCheck:
@@ -371,6 +396,8 @@ bool BytecodeHasNoSideEffect(interpreter::Bytecode bytecode) {
bool BuiltinHasNoSideEffect(Builtins::Name id) {
switch (id) {
// Whitelist for builtins.
+ // Array builtins.
+ case Builtins::kArrayPrototypeValues:
// Math builtins.
case Builtins::kMathAbs:
case Builtins::kMathAcos:
« no previous file with comments | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect-control.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698