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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp

Issue 2214193002: [DevTools] Introduce unserializableValue in RemoteObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hidden Created 4 years, 4 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
Index: third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
index 7a4ad6bb377db5038529b3ba5e8060abf12960e8..3b4552ee8d9147e986bdf8702d8373240d750e02 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/InjectedScript.cpp
@@ -289,10 +289,10 @@ v8::MaybeLocal<v8::Value> InjectedScript::resolveCallArgument(ErrorString* error
return v8::MaybeLocal<v8::Value>();
return object;
}
- if (callArgument->hasValue()) {
- String16 value = callArgument->getValue(nullptr)->toJSONString();
- if (callArgument->getType(String16()) == "number")
- value = "Number(" + value + ")";
+ if (callArgument->hasValue() || callArgument->hasUnserializableValue()) {
+ String16 value = callArgument->hasValue() ?
+ callArgument->getValue(nullptr)->toJSONString() :
+ "Number(\"" + callArgument->getUnserializableValue("") + "\")";
v8::Local<v8::Value> object;
if (!m_context->inspector()->compileAndRunInternalScript(m_context->context(), toV8String(m_context->isolate(), value)).ToLocal(&object)) {
*errorString = "Couldn't parse value object in call argument";

Powered by Google App Engine
This is Rietveld 408576698