| Index: src/inspector/InjectedScript.cpp
|
| diff --git a/src/inspector/InjectedScript.cpp b/src/inspector/InjectedScript.cpp
|
| index 5b1b2b1b6d34316b8999434bd90183531aefb7d6..ebd26ece673bb1c0dffe526be29082e9b600b650 100644
|
| --- a/src/inspector/InjectedScript.cpp
|
| +++ b/src/inspector/InjectedScript.cpp
|
| @@ -144,10 +144,10 @@
|
| *properties = Array<PropertyDescriptor>::create();
|
| return;
|
| }
|
| - if (hasInternalError(errorString, resultValue.IsEmpty())) return;
|
| +
|
| std::unique_ptr<protocol::Value> protocolValue =
|
| - toProtocolValue(errorString, context, resultValue);
|
| - if (!protocolValue) return;
|
| + toProtocolValue(context, resultValue);
|
| + if (hasInternalError(errorString, !protocolValue)) return;
|
| protocol::ErrorSupport errors(errorString);
|
| std::unique_ptr<Array<PropertyDescriptor>> result =
|
| Array<PropertyDescriptor>::parse(protocolValue.get(), &errors);
|
| @@ -178,12 +178,10 @@
|
| .ToLocal(&wrappedObject))
|
| return nullptr;
|
| protocol::ErrorSupport errors;
|
| - std::unique_ptr<protocol::Value> protocolValue =
|
| - toProtocolValue(errorString, context, wrappedObject);
|
| - if (!protocolValue) return nullptr;
|
| std::unique_ptr<protocol::Runtime::RemoteObject> remoteObject =
|
| - protocol::Runtime::RemoteObject::parse(protocolValue.get(), &errors);
|
| - if (!remoteObject) *errorString = errors.errors();
|
| + protocol::Runtime::RemoteObject::parse(
|
| + toProtocolValue(context, wrappedObject).get(), &errors);
|
| + if (!remoteObject) *errorString = "Object has too long reference chain";
|
| return remoteObject;
|
| }
|
|
|
| @@ -274,13 +272,10 @@
|
| function.appendArgument(columns);
|
| bool hadException = false;
|
| v8::Local<v8::Value> r = function.call(hadException);
|
| - if (hadException || r.IsEmpty()) return nullptr;
|
| - protocol::ErrorString errorString;
|
| - std::unique_ptr<protocol::Value> protocolValue =
|
| - toProtocolValue(&errorString, context, r);
|
| - if (!protocolValue) return nullptr;
|
| + if (hadException) return nullptr;
|
| protocol::ErrorSupport errors;
|
| - return protocol::Runtime::RemoteObject::parse(protocolValue.get(), &errors);
|
| + return protocol::Runtime::RemoteObject::parse(
|
| + toProtocolValue(context, r).get(), &errors);
|
| }
|
|
|
| bool InjectedScript::findObject(ErrorString* errorString,
|
|
|