Chromium Code Reviews| Index: src/inspector/InjectedScript.cpp |
| diff --git a/src/inspector/InjectedScript.cpp b/src/inspector/InjectedScript.cpp |
| index ebd26ece673bb1c0dffe526be29082e9b600b650..d42c6646b9c115fc3249a498532ea54fb3d8962b 100644 |
| --- a/src/inspector/InjectedScript.cpp |
| +++ b/src/inspector/InjectedScript.cpp |
| @@ -146,8 +146,8 @@ void InjectedScript::getProperties( |
| } |
| std::unique_ptr<protocol::Value> protocolValue = |
|
dgozman
2016/09/19 17:35:05
Looks like resultValue could be empty here?
kozy
2016/09/20 15:34:27
Added check. I think that it should be not empty i
|
| - toProtocolValue(context, resultValue); |
| - if (hasInternalError(errorString, !protocolValue)) return; |
| + toProtocolValue(errorString, context, resultValue); |
| + if (!protocolValue) return; |
| protocol::ErrorSupport errors(errorString); |
| std::unique_ptr<Array<PropertyDescriptor>> result = |
| Array<PropertyDescriptor>::parse(protocolValue.get(), &errors); |
| @@ -180,8 +180,7 @@ std::unique_ptr<protocol::Runtime::RemoteObject> InjectedScript::wrapObject( |
| protocol::ErrorSupport errors; |
| std::unique_ptr<protocol::Runtime::RemoteObject> remoteObject = |
| protocol::Runtime::RemoteObject::parse( |
| - toProtocolValue(context, wrappedObject).get(), &errors); |
| - if (!remoteObject) *errorString = "Object has too long reference chain"; |
| + toProtocolValue(errorString, context, wrappedObject).get(), &errors); |
|
dgozman
2016/09/19 17:35:05
Should check return value of toProtocolValue and u
kozy
2016/09/20 15:34:27
Done.
|
| return remoteObject; |
| } |
| @@ -274,8 +273,9 @@ std::unique_ptr<protocol::Runtime::RemoteObject> InjectedScript::wrapTable( |
| v8::Local<v8::Value> r = function.call(hadException); |
|
dgozman
2016/09/19 17:35:05
Looks like r could be empty here?
kozy
2016/09/20 15:34:27
Done.
|
| if (hadException) return nullptr; |
| protocol::ErrorSupport errors; |
| + protocol::ErrorString errorString; |
| return protocol::Runtime::RemoteObject::parse( |
| - toProtocolValue(context, r).get(), &errors); |
| + toProtocolValue(&errorString, context, r).get(), &errors); |
|
dgozman
2016/09/19 17:35:05
Should check return value of toProtocolValue and u
kozy
2016/09/20 15:34:27
Done.
|
| } |
| bool InjectedScript::findObject(ErrorString* errorString, |