| Index: Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
|
| diff --git a/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp b/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
|
| index 123f9eb0fb322e80be36da420dbf52b4c9915b8c..d29360ac3cb693b049ecb6495d480feb8db88d17 100644
|
| --- a/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
|
| +++ b/Source/bindings/v8/custom/V8HTMLPlugInElementCustom.cpp
|
| @@ -33,7 +33,7 @@
|
| #include "V8HTMLAppletElement.h"
|
| #include "V8HTMLEmbedElement.h"
|
| #include "V8HTMLObjectElement.h"
|
| -#include "bindings/v8/ScriptValue.h"
|
| +#include "bindings/v8/SharedPersistent.h"
|
| #include "bindings/v8/V8Binding.h"
|
| #include "bindings/v8/V8NPObject.h"
|
| #include "core/frame/UseCounter.h"
|
| @@ -47,7 +47,11 @@
|
| static void npObjectNamedGetter(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| HTMLPlugInElement* imp = C::toNative(info.Holder());
|
| - v8::Handle<v8::Object> instanceTemplate = v8::Handle<v8::Object>::Cast(imp->pluginWrapper().v8Value());
|
| + RefPtr<SharedPersistent<v8::Object> > wrapper = imp->pluginWrapper();
|
| + if (!wrapper)
|
| + return;
|
| +
|
| + v8::Local<v8::Object> instanceTemplate = wrapper->newLocal(info.GetIsolate());
|
| if (instanceTemplate.IsEmpty())
|
| return;
|
|
|
| @@ -58,7 +62,11 @@
|
| static void npObjectNamedSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| HTMLPlugInElement* imp = C::toNative(info.Holder());
|
| - v8::Handle<v8::Object> instanceTemplate = v8::Handle<v8::Object>::Cast(imp->pluginWrapper().v8Value());
|
| + RefPtr<SharedPersistent<v8::Object> > wrapper = imp->pluginWrapper();
|
| + if (!wrapper)
|
| + return;
|
| +
|
| + v8::Local<v8::Object> instanceTemplate = wrapper->newLocal(info.GetIsolate());
|
| if (instanceTemplate.IsEmpty())
|
| return;
|
|
|
| @@ -120,7 +128,11 @@
|
| void npObjectIndexedGetter(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| HTMLPlugInElement* imp = C::toNative(info.Holder());
|
| - v8::Handle<v8::Object> instanceTemplate = v8::Handle<v8::Object>::Cast(imp->pluginWrapper().v8Value());
|
| + RefPtr<SharedPersistent<v8::Object> > wrapper = imp->pluginWrapper();
|
| + if (!wrapper)
|
| + return;
|
| +
|
| + v8::Local<v8::Object> instanceTemplate = wrapper->newLocal(info.GetIsolate());
|
| if (instanceTemplate.IsEmpty())
|
| return;
|
|
|
| @@ -131,7 +143,11 @@
|
| void npObjectIndexedSetter(uint32_t index, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<v8::Value>& info)
|
| {
|
| HTMLPlugInElement* imp = C::toNative(info.Holder());
|
| - v8::Handle<v8::Object> instanceTemplate = v8::Handle<v8::Object>::Cast(imp->pluginWrapper().v8Value());
|
| + RefPtr<SharedPersistent<v8::Object> > wrapper = imp->pluginWrapper();
|
| + if (!wrapper)
|
| + return;
|
| +
|
| + v8::Local<v8::Object> instanceTemplate = wrapper->newLocal(info.GetIsolate());
|
| if (instanceTemplate.IsEmpty())
|
| return;
|
|
|
|
|