Title: [132038] trunk/Source/WebCore
Revision
132038
Author
morr...@google.com
Date
2012-10-22 01:26:03 -0700 (Mon, 22 Oct 2012)

Log Message

Unreviewed follow up to update test result after r132033.

* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::V8TestObj::installPerContextProperties):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (132037 => 132038)


--- trunk/Source/WebCore/ChangeLog	2012-10-22 08:22:47 UTC (rev 132037)
+++ trunk/Source/WebCore/ChangeLog	2012-10-22 08:26:03 UTC (rev 132038)
@@ -1,3 +1,10 @@
+2012-10-22  MORITA Hajime  <morr...@google.com>
+
+        Unreviewed follow up to update test result after r132033.
+
+        * bindings/scripts/test/V8/V8TestObj.cpp:
+        (WebCore::V8TestObj::installPerContextProperties):
+
 2012-10-21  MORITA Hajime  <morr...@google.com>
 
         [V8] V8EnablePerContext shouldn't require document() accessor to the native object.

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (132037 => 132038)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-10-22 08:22:47 UTC (rev 132037)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-10-22 08:26:03 UTC (rev 132038)
@@ -2326,15 +2326,16 @@
 void V8TestObj::installPerContextProperties(v8::Handle<v8::Object> instance, TestObj* impl)
 {
     v8::Local<v8::Object> proto = v8::Local<v8::Object>::Cast(instance->GetPrototype());
+    ScriptExecutionContext* context = toScriptExecutionContext(proto->CreationContext());
     // When building QtWebkit with V8 this variable is unused when none of the features are enabled.
-    UNUSED_PARAM(proto);
-    if (ContextFeatures::enabledPerContextAttr1Enabled(impl->document())) {
+    UNUSED_PARAM(context);
+    if (context && context->isDocument() && ContextFeatures::enabledPerContextAttr1Enabled(static_cast<Document*>(context))) {
         static const V8DOMConfiguration::BatchedAttribute attrData =\
         // Attribute 'enabledPerContextAttr1' (Type: 'attribute' ExtAttr: 'V8EnabledPerContext')
         {"enabledPerContextAttr1", TestObjV8Internal::enabledPerContextAttr1AttrGetter, TestObjV8Internal::enabledPerContextAttr1AttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
         V8DOMConfiguration::configureAttribute(instance, proto, attrData);
     }
-    if (ContextFeatures::featureNameEnabled(impl->document())) {
+    if (context && context->isDocument() && ContextFeatures::featureNameEnabled(static_cast<Document*>(context))) {
         static const V8DOMConfiguration::BatchedAttribute attrData =\
         // Attribute 'enabledPerContextAttr2' (Type: 'attribute' ExtAttr: 'V8EnabledPerContext')
         {"enabledPerContextAttr2", TestObjV8Internal::enabledPerContextAttr2AttrGetter, TestObjV8Internal::enabledPerContextAttr2AttrSetter, 0 /* no data */, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), 0 /* on instance */};
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to