| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 return; | 161 return; |
| 162 int boundId = 0; | 162 int boundId = 0; |
| 163 if (!object->getNumber("id", &boundId)) | 163 if (!object->getNumber("id", &boundId)) |
| 164 return; | 164 return; |
| 165 m_native->unbind(boundId); | 165 m_native->unbind(boundId); |
| 166 } | 166 } |
| 167 | 167 |
| 168 PassOwnPtr<protocol::Runtime::RemoteObject> InjectedScript::wrapObject(ErrorStri
ng* errorString, v8::Local<v8::Value> value, const String16& groupName, bool for
ceValueType, bool generatePreview) const | 168 PassOwnPtr<protocol::Runtime::RemoteObject> InjectedScript::wrapObject(ErrorStri
ng* errorString, v8::Local<v8::Value> value, const String16& groupName, bool for
ceValueType, bool generatePreview) const |
| 169 { | 169 { |
| 170 v8::HandleScope handles(m_context->isolate()); | 170 v8::HandleScope handles(m_context->isolate()); |
| 171 V8FunctionCall function(m_context->debugger(), m_context->context(), v8Value
(), "wrapObject"); | |
| 172 v8::Local<v8::Value> wrappedObject; | 171 v8::Local<v8::Value> wrappedObject; |
| 173 if (!wrapValue(errorString, value, groupName, forceValueType, generatePrevie
w).ToLocal(&wrappedObject)) | 172 if (!wrapValue(errorString, value, groupName, forceValueType, generatePrevie
w).ToLocal(&wrappedObject)) |
| 174 return nullptr; | 173 return nullptr; |
| 175 protocol::ErrorSupport errors; | 174 protocol::ErrorSupport errors; |
| 176 OwnPtr<protocol::Runtime::RemoteObject> remoteObject = protocol::Runtime::Re
moteObject::parse(toProtocolValue(m_context->context(), wrappedObject).get(), &e
rrors); | 175 OwnPtr<protocol::Runtime::RemoteObject> remoteObject = protocol::Runtime::Re
moteObject::parse(toProtocolValue(m_context->context(), wrappedObject).get(), &e
rrors); |
| 177 if (!remoteObject) | 176 if (!remoteObject) |
| 178 *errorString = "Object has too long reference chain"; | 177 *errorString = "Object has too long reference chain"; |
| 179 return remoteObject.release(); | 178 return remoteObject.release(); |
| 180 } | 179 } |
| 181 | 180 |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl*
session) | 551 void InjectedScript::CallFrameScope::findInjectedScript(V8InspectorSessionImpl*
session) |
| 553 { | 552 { |
| 554 OwnPtr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_errorString,
m_remoteCallFrameId); | 553 OwnPtr<RemoteCallFrameId> remoteId = RemoteCallFrameId::parse(m_errorString,
m_remoteCallFrameId); |
| 555 if (!remoteId) | 554 if (!remoteId) |
| 556 return; | 555 return; |
| 557 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); | 556 m_frameOrdinal = static_cast<size_t>(remoteId->frameOrdinal()); |
| 558 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get()
); | 557 m_injectedScript = session->findInjectedScript(m_errorString, remoteId.get()
); |
| 559 } | 558 } |
| 560 | 559 |
| 561 } // namespace blink | 560 } // namespace blink |
| OLD | NEW |