Revert "[inspector] doesn't run user code to stringify console method arg"
This reverts commit 82451d45a7
.
Reason for revert:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/16923
Original change's description:
> [inspector] doesn't run user code to stringify console method arg
>
> Otherwise user code can produce an exception and we will crash.
>
> R=jakob@chromium.org
>
> Bug: chromium:736302
> Change-Id: I078150909b0348a63e8c375b508e34fc4751b4ab
> Reviewed-on: https://chromium-review.googlesource.com/565628
> Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#46566}
TBR=kozyatinskiy@chromium.org,jgruber@chromium.org,jakob@chromium.org
Change-Id: I6d7e06fad2ab6c1c894c199fe7b3b6afb2930734
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:736302
Reviewed-on: https://chromium-review.googlesource.com/567060
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46567}
This commit is contained in:
parent
82451d45a7
commit
c917ecfe4e
@ -112,10 +112,6 @@ class ConsoleHelper {
|
||||
String16 firstArgToString(const String16& defaultValue) {
|
||||
if (m_info.Length() < 1) return defaultValue;
|
||||
v8::Local<v8::String> titleValue;
|
||||
v8::TryCatch tryCatch(m_context->GetIsolate());
|
||||
v8::Isolate::DisallowJavascriptExecutionScope throwJs(
|
||||
m_context->GetIsolate(),
|
||||
v8::Isolate::DisallowJavascriptExecutionScope::THROW_ON_FAILURE);
|
||||
if (m_info[0]->IsObject()) {
|
||||
if (!m_info[0].As<v8::Object>()->ObjectProtoToString(m_context).ToLocal(
|
||||
&titleValue))
|
||||
|
@ -1,29 +0,0 @@
|
||||
crbug.com/736302
|
||||
{
|
||||
method : Runtime.consoleAPICalled
|
||||
params : {
|
||||
args : [
|
||||
[0] : {
|
||||
type : string
|
||||
value : 1
|
||||
}
|
||||
]
|
||||
executionContextId : <executionContextId>
|
||||
stackTrace : {
|
||||
callFrames : [
|
||||
[0] : {
|
||||
columnNumber : 10
|
||||
functionName :
|
||||
lineNumber : 1
|
||||
scriptId : <scriptId>
|
||||
url :
|
||||
}
|
||||
]
|
||||
}
|
||||
timestamp : <timestamp>
|
||||
type : count
|
||||
}
|
||||
}
|
||||
{
|
||||
type : undefined
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
// Copyright 2017 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
let {session, contextGroup, Protocol} = InspectorTest.start('crbug.com/736302');
|
||||
|
||||
(async function main() {
|
||||
Protocol.Runtime.enable();
|
||||
Protocol.Runtime.onConsoleAPICalled(InspectorTest.logMessage);
|
||||
let r = await Protocol.Runtime.evaluate({expression: `
|
||||
console.count({
|
||||
get [Symbol.toStringTag]() {
|
||||
throw new Error();
|
||||
}
|
||||
});`});
|
||||
InspectorTest.logMessage(r.result.result);
|
||||
InspectorTest.completeTest();
|
||||
})();
|
Loading…
Reference in New Issue
Block a user