summaryrefslogtreecommitdiffstats
path: root/webkit/port/bindings/v8/v8_custom.cpp
diff options
context:
space:
mode:
authorojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-03 23:07:39 +0000
committerojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-03 23:07:39 +0000
commit2012dc919c070d111e15212b30363191baec0946 (patch)
tree2f2e0bd2e6dfb8601fcce5f4e83da3e186fe037c /webkit/port/bindings/v8/v8_custom.cpp
parent9da4a5aeeb2efb12cd4707fdb5333ee9cc1419c6 (diff)
downloadchromium_src-2012dc919c070d111e15212b30363191baec0946.zip
chromium_src-2012dc919c070d111e15212b30363191baec0946.tar.gz
chromium_src-2012dc919c070d111e15212b30363191baec0946.tar.bz2
src/webkit side of webkit merge 38760:38800
Review URL: http://codereview.chromium.org/13034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6325 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port/bindings/v8/v8_custom.cpp')
-rw-r--r--webkit/port/bindings/v8/v8_custom.cpp55
1 files changed, 35 insertions, 20 deletions
diff --git a/webkit/port/bindings/v8/v8_custom.cpp b/webkit/port/bindings/v8/v8_custom.cpp
index 15028a5..c5cdc34 100644
--- a/webkit/port/bindings/v8/v8_custom.cpp
+++ b/webkit/port/bindings/v8/v8_custom.cpp
@@ -101,6 +101,7 @@
#include "RenderWidget.h"
#include "ScheduledAction.h"
#include "ScriptCallContext.h"
+#include "ScriptController.h"
#include "SecurityOrigin.h"
#include "Settings.h"
#include "StyleSheetList.h"
@@ -1794,10 +1795,15 @@ NAMED_PROPERTY_GETTER(HTMLPlugInElement) {
INC_STATS("DOM.HTMLPlugInElement.NamedPropertyGetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
- v8::Local<v8::Object> instance =
- v8::Local<v8::Object>::New(imp->getInstance());
- if (instance.IsEmpty()) return v8::Handle<v8::Object>();
- return NPObjectGetNamedProperty(instance, name);
+ ScriptInstance script_instance = imp->getInstance();
+ if (script_instance) {
+ v8::Local<v8::Object> instance =
+ v8::Local<v8::Object>::New(script_instance->instance());
+ if (!instance.IsEmpty()) {
+ return NPObjectGetNamedProperty(instance, name);
+ }
+ }
+ return v8::Handle<v8::Object>();
}
@@ -1805,13 +1811,15 @@ NAMED_PROPERTY_SETTER(HTMLPlugInElement) {
INC_STATS("DOM.HTMLPlugInElement.NamedPropertySetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
- v8::Local<v8::Object> instance =
- v8::Local<v8::Object>::New(imp->getInstance());
- if (instance.IsEmpty()) {
- return v8::Handle<v8::Value>(); // do not block the call
+ ScriptInstance script_instance = imp->getInstance();
+ if (script_instance) {
+ v8::Local<v8::Object> instance =
+ v8::Local<v8::Object>::New(script_instance->instance());
+ if (!instance.IsEmpty()) {
+ return NPObjectSetNamedProperty(instance, name, value);
+ }
}
-
- return NPObjectSetNamedProperty(instance, name, value);
+ return v8::Handle<v8::Value>(); // do not block the call
}
@@ -1825,10 +1833,15 @@ INDEXED_PROPERTY_GETTER(HTMLPlugInElement) {
INC_STATS("DOM.HTMLPlugInElement.IndexedPropertyGetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
- v8::Local<v8::Object> instance =
- v8::Local<v8::Object>::New(imp->getInstance());
- if (instance.IsEmpty()) return v8::Handle<v8::Object>();
- return NPObjectGetIndexedProperty(instance, index);
+ ScriptInstance script_instance = imp->getInstance();
+ if (script_instance) {
+ v8::Local<v8::Object> instance =
+ v8::Local<v8::Object>::New(script_instance->instance());
+ if (!instance.IsEmpty()) {
+ return NPObjectGetIndexedProperty(instance, index);
+ }
+ }
+ return v8::Handle<v8::Object>();
}
@@ -1836,13 +1849,15 @@ INDEXED_PROPERTY_SETTER(HTMLPlugInElement) {
INC_STATS("DOM.HTMLPlugInElement.IndexedPropertySetter");
HTMLPlugInElement* imp =
V8Proxy::DOMWrapperToNode<HTMLPlugInElement>(info.Holder());
- v8::Local<v8::Object> instance =
- v8::Local<v8::Object>::New(imp->getInstance());
- if (instance.IsEmpty()) {
- return v8::Handle<v8::Value>(); // do not block the call
+ ScriptInstance script_instance = imp->getInstance();
+ if (script_instance) {
+ v8::Local<v8::Object> instance =
+ v8::Local<v8::Object>::New(script_instance->instance());
+ if (!instance.IsEmpty()) {
+ return NPObjectSetIndexedProperty(instance, index, value);
+ }
}
-
- return NPObjectSetIndexedProperty(instance, index, value);
+ return v8::Handle<v8::Value>(); // do not block the call
}
NAMED_PROPERTY_GETTER(StyleSheetList) {