params.addField("arguments", arguments);
}
if (isError) {
// We do not know the property value. Just dispatch the error event.
OnRemoteObjectPropertyChanged parsedResponse =
DebuggerChromeApiUtils.createOnEditRemoteObjectPropertyResponse(
remoteObjectId, propertyName, null, true);
dispatchOnRemoteObjectPropertyChanged(sessionId, parsedResponse);
return;
}
sendCustomEvent(sessionId, METHOD_RUNTIME_CALL_FUNCTION_ON, params, new Callback() {
@Override
public void run(ExtensionResponse response) {
RemoteObject newValue =
DebuggerChromeApiUtils.parseCallFunctionOnResult(response.result());
boolean isError = response.isError()
|| newValue == null
|| !DebuggerApiUtils.equal(evaluationResult, newValue);
OnRemoteObjectPropertyChanged parsedResponse =
DebuggerChromeApiUtils.createOnEditRemoteObjectPropertyResponse(
remoteObjectId, propertyName, newValue, isError);
dispatchOnRemoteObjectPropertyChanged(sessionId, parsedResponse);
}
});