Chromium Code Reviews| Index: Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp |
| diff --git a/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp b/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp |
| index 1ce710b6e32ef5e672ee2681447f31c1152e3ebd..1d8bd9b63c290d78c9640a6c601e2f51b59955a0 100644 |
| --- a/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp |
| +++ b/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp |
| @@ -72,12 +72,16 @@ static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(PassRefPtrWillBeR |
| // Create a weak reference to the v8 wrapper of InspectorBackend to deref |
| // InspectorBackend when the wrapper is garbage collected. |
| InjectedScriptManager::CallbackData* callbackData = injectedScriptManager->createCallbackData(injectedScriptManager); |
| +#if ENABLE(OILPAN) |
| + callbackData->hostPtr = new WrapperPersistent<InjectedScriptHost>(host.get()); |
| +#else |
| callbackData->host = host.get(); |
|
zerny-chromium
2014/09/01 14:13:37
Is this field never used in the oilpan build?
wibling-chromium
2014/09/02 11:19:37
No, AFAICT it is only used to keep the object aliv
|
| +#endif |
| callbackData->handle.set(isolate, wrapper); |
| callbackData->handle.setWeak(callbackData, &InjectedScriptManager::setWeakCallback); |
| #if ENABLE(OILPAN) |
| - V8DOMWrapper::setNativeInfoWithPersistentHandle(wrapper, &V8InjectedScriptHost::wrapperTypeInfo, V8InjectedScriptHost::toInternalPointer(host), &callbackData->host); |
| + V8DOMWrapper::setNativeInfoWithPersistentHandle(wrapper, &V8InjectedScriptHost::wrapperTypeInfo, V8InjectedScriptHost::toInternalPointer(host), callbackData->hostPtr); |
| #else |
| V8DOMWrapper::setNativeInfo(wrapper, &V8InjectedScriptHost::wrapperTypeInfo, V8InjectedScriptHost::toInternalPointer(host.get())); |
| #endif |