Title: [114645] trunk/Source/WebCore
Revision
114645
Author
[email protected]
Date
2012-04-19 10:00:21 -0700 (Thu, 19 Apr 2012)

Log Message

Unreviewed, rolling out r114421.
http://trac.webkit.org/changeset/114421
https://bugs.webkit.org/show_bug.cgi?id=84103

Chromium crash

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
(GenerateFunctionCallString):
(NativeToJSValue):
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
(WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
(WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
(WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
(WebCore::TestObjV8Internal::stringAttrAttrGetter):
(WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
(WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
(WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
(WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
(WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
(WebCore::TestObjV8Internal::hashAttrGetter):
(WebCore::TestObjV8Internal::conditionalMethod1Callback):
* bindings/v8/V8Binding.cpp:
(WebCore::getElementStringAttr):
* bindings/v8/V8Binding.h:
(WebCore::v8ExternalString):
(WebCore::v8String):
(WebCore::v8StringOrNull):
(WebCore::v8StringOrUndefined):
(WebCore::v8StringOrFalse):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (114644 => 114645)


--- trunk/Source/WebCore/ChangeLog	2012-04-19 16:59:34 UTC (rev 114644)
+++ trunk/Source/WebCore/ChangeLog	2012-04-19 17:00:21 UTC (rev 114645)
@@ -1,3 +1,40 @@
+2012-04-19  Kentaro Hara  <[email protected]>
+
+        Unreviewed, rolling out r114421.
+        http://trac.webkit.org/changeset/114421
+        https://bugs.webkit.org/show_bug.cgi?id=84103
+
+        Chromium crash
+
+        * bindings/scripts/CodeGeneratorV8.pm:
+        (GenerateNormalAttrGetter):
+        (GenerateFunctionCallString):
+        (NativeToJSValue):
+        * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
+        (WebCore::TestEventConstructorV8Internal::attr1AttrGetter):
+        (WebCore::TestEventConstructorV8Internal::attr2AttrGetter):
+        * bindings/scripts/test/V8/V8TestInterface.cpp:
+        (WebCore::TestInterfaceV8Internal::supplementalStr1AttrGetter):
+        (WebCore::TestInterfaceV8Internal::supplementalStr2AttrGetter):
+        * bindings/scripts/test/V8/V8TestObj.cpp:
+        (WebCore::TestObjV8Internal::readOnlyStringAttrAttrGetter):
+        (WebCore::TestObjV8Internal::stringAttrAttrGetter):
+        (WebCore::TestObjV8Internal::reflectedStringAttrAttrGetter):
+        (WebCore::TestObjV8Internal::reflectedURLAttrAttrGetter):
+        (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrGetter):
+        (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrGetter):
+        (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrGetter):
+        (WebCore::TestObjV8Internal::hashAttrGetter):
+        (WebCore::TestObjV8Internal::conditionalMethod1Callback):
+        * bindings/v8/V8Binding.cpp:
+        (WebCore::getElementStringAttr):
+        * bindings/v8/V8Binding.h:
+        (WebCore::v8ExternalString):
+        (WebCore::v8String):
+        (WebCore::v8StringOrNull):
+        (WebCore::v8StringOrUndefined):
+        (WebCore::v8StringOrFalse):
+
 2012-04-19  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r114626.

Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (114644 => 114645)


--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-04-19 16:59:34 UTC (rev 114644)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm	2012-04-19 17:00:21 UTC (rev 114645)
@@ -1009,7 +1009,7 @@
     return value;
 END
         } else {
-            push(@implContentDecls, "    " . ReturnNativeToJSValue($attribute->signature, $result, "info.GetIsolate()").";\n");
+            push(@implContentDecls, "    " . ReturnNativeToJSValue($attribute->signature, $result).";\n");
         }
     }
 
@@ -3340,7 +3340,7 @@
     }
 
     $return .= ".release()" if ($returnIsRef);
-    $result .= $indent . ReturnNativeToJSValue($function->signature, $return, "args.GetIsolate()") . ";\n";
+    $result .= $indent . ReturnNativeToJSValue($function->signature, $return) . ";\n";
 
     return $result;
 }
@@ -3757,7 +3757,6 @@
 {
     my $signature = shift;
     my $value = shift;
-    my $getIsolate = shift;
     my $type = GetTypeFromSignature($signature);
 
     return "v8Boolean($value)" if $type eq "boolean";
@@ -3788,15 +3787,14 @@
 
     if ($codeGenerator->IsStringType($type)) {
         my $conv = $signature->extendedAttributes->{"TreatReturnedNullStringAs"};
-        my $getIsolateArgument = $getIsolate ? ", $getIsolate" : "";
         if (defined $conv) {
-            return "v8StringOrNull($value$getIsolateArgument)" if $conv eq "Null";
-            return "v8StringOrUndefined($value$getIsolateArgument)" if $conv eq "Undefined";
-            return "v8StringOrFalse($value$getIsolateArgument)" if $conv eq "False";
+            return "v8StringOrNull($value)" if $conv eq "Null";
+            return "v8StringOrUndefined($value)" if $conv eq "Undefined";
+            return "v8StringOrFalse($value)" if $conv eq "False";
 
             die "Unknown value for TreatReturnedNullStringAs extended attribute";
         }
-        return "v8String($value$getIsolateArgument)";
+        return "v8String($value)";
     }
 
     my $arrayType = $codeGenerator->GetArrayType($type);

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp (114644 => 114645)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp	2012-04-19 16:59:34 UTC (rev 114644)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestEventConstructor.cpp	2012-04-19 17:00:21 UTC (rev 114645)
@@ -43,14 +43,14 @@
 {
     INC_STATS("DOM.TestEventConstructor.attr1._get");
     TestEventConstructor* imp = V8TestEventConstructor::toNative(info.Holder());
-    return v8String(imp->attr1(), info.GetIsolate());
+    return v8String(imp->attr1());
 }
 
 static v8::Handle<v8::Value> attr2AttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
 {
     INC_STATS("DOM.TestEventConstructor.attr2._get");
     TestEventConstructor* imp = V8TestEventConstructor::toNative(info.Holder());
-    return v8String(imp->attr2(), info.GetIsolate());
+    return v8String(imp->attr2());
 }
 
 } // namespace TestEventConstructorV8Internal

Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp (114644 => 114645)


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp	2012-04-19 16:59:34 UTC (rev 114644)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestInterface.cpp	2012-04-19 17:00:21 UTC (rev 114645)
@@ -53,7 +53,7 @@
 {
     INC_STATS("DOM.TestInterface.supplementalStr1._get");
     TestInterface* imp = V8TestInterface::toNative(info.Holder());
-    return v8String(TestSupplemental::supplementalStr1(imp), info.GetIsolate());
+    return v8String(TestSupplemental::supplementalStr1(imp));
 }
 
 #endif // ENABLE(Condition11) || ENABLE(Condition12)
@@ -64,7 +64,7 @@
 {
     INC_STATS("DOM.TestInterface.supplementalStr2._get");
     TestInterface* imp = V8TestInterface::toNative(info.Holder());
-    return v8String(TestSupplemental::supplementalStr2(imp), info.GetIsolate());
+    return v8String(TestSupplemental::supplementalStr2(imp));
 }
 
 #endif // ENABLE(Condition11) || ENABLE(Condition12)

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


--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-04-19 16:59:34 UTC (rev 114644)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp	2012-04-19 17:00:21 UTC (rev 114645)
@@ -90,7 +90,7 @@
 {
     INC_STATS("DOM.TestObj.readOnlyStringAttr._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->readOnlyStringAttr(), info.GetIsolate());
+    return v8String(imp->readOnlyStringAttr());
 }
 
 static v8::Handle<v8::Value> readOnlyTestObjAttrAttrGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
@@ -191,7 +191,7 @@
 {
     INC_STATS("DOM.TestObj.stringAttr._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->stringAttr(), info.GetIsolate());
+    return v8String(imp->stringAttr());
 }
 
 static void stringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -271,7 +271,7 @@
 {
     INC_STATS("DOM.TestObj.reflectedStringAttr._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr), info.GetIsolate());
+    return v8String(imp->getAttribute(WebCore::HTMLNames::reflectedstringattrAttr));
 }
 
 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -335,7 +335,7 @@
 {
     INC_STATS("DOM.TestObj.reflectedURLAttr._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr), info.GetIsolate());
+    return v8String(imp->getURLAttribute(WebCore::HTMLNames::reflectedurlattrAttr));
 }
 
 static void reflectedURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -351,7 +351,7 @@
 {
     INC_STATS("DOM.TestObj.reflectedStringAttr._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr), info.GetIsolate());
+    return v8String(imp->getAttribute(WebCore::HTMLNames::customContentStringAttrAttr));
 }
 
 static void reflectedStringAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -399,7 +399,7 @@
 {
     INC_STATS("DOM.TestObj.reflectedCustomURLAttr._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr), info.GetIsolate());
+    return v8String(imp->getURLAttribute(WebCore::HTMLNames::customContentURLAttrAttr));
 }
 
 static void reflectedCustomURLAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -465,7 +465,7 @@
         V8Proxy::setDOMException(ec);
         return v8::Handle<v8::Value>();
     }
-    return v8String(v, info.GetIsolate());
+    return v8String(v);
 }
 
 static void stringAttrWithGetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -484,7 +484,7 @@
 {
     INC_STATS("DOM.TestObj.stringAttrWithSetterException._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->stringAttrWithSetterException(), info.GetIsolate());
+    return v8String(imp->stringAttrWithSetterException());
 }
 
 static void stringAttrWithSetterExceptionAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)
@@ -999,7 +999,7 @@
 {
     INC_STATS("DOM.TestObj.hash._get");
     TestObj* imp = V8TestObj::toNative(info.Holder());
-    return v8String(imp->hash(), info.GetIsolate());
+    return v8String(imp->hash());
 }
 
 static v8::Handle<v8::Value> TestObjConstructorGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info)
@@ -1460,7 +1460,7 @@
 {
     INC_STATS("DOM.TestObj.conditionalMethod1");
     TestObj* imp = V8TestObj::toNative(args.Holder());
-    return v8String(imp->conditionalMethod1(), args.GetIsolate());
+    return v8String(imp->conditionalMethod1());
 }
 
 #endif // ENABLE(Condition1)

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.cpp (114644 => 114645)


--- trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2012-04-19 16:59:34 UTC (rev 114644)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2012-04-19 17:00:21 UTC (rev 114645)
@@ -551,7 +551,7 @@
                                            const QualifiedName& name) 
 {
     Element* imp = V8Element::toNative(info.Holder());
-    return v8ExternalString(imp->getAttribute(name), info.GetIsolate());
+    return v8ExternalString(imp->getAttribute(name));
 }
 
 void setElementStringAttr(const v8::AccessorInfo& info,

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (114644 => 114645)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-04-19 16:59:34 UTC (rev 114644)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-04-19 17:00:21 UTC (rev 114645)
@@ -244,20 +244,20 @@
     // Return a V8 external string that shares the underlying buffer with the given
     // WebCore string. The reference counting mechanism is used to keep the
     // underlying buffer alive while the string is still live in the V8 engine.
-    inline v8::Local<v8::String> v8ExternalString(const String& string, v8::Isolate* isolate = 0)
+    inline v8::Local<v8::String> v8ExternalString(const String& string)
     {
         StringImpl* stringImpl = string.impl();
         if (!stringImpl)
             return v8::String::Empty();
 
-        V8BindingPerIsolateData* data = "" ? static_cast<V8BindingPerIsolateData*>(isolate->GetData()) : V8BindingPerIsolateData::current();
+        V8BindingPerIsolateData* data = ""
         return data->stringCache()->v8ExternalString(stringImpl);
     }
 
     // Convert a string to a V8 string.
-    inline v8::Handle<v8::String> v8String(const String& string, v8::Isolate* isolate = 0)
+    inline v8::Handle<v8::String> v8String(const String& string)
     {
-        return v8ExternalString(string, isolate);
+        return v8ExternalString(string);
     }
 
     template<typename T>
@@ -396,19 +396,19 @@
         return v8::String::NewUndetectable(fromWebCoreString(str), str.length());
     }
 
-    inline v8::Handle<v8::Value> v8StringOrNull(const String& str, v8::Isolate* isolate = 0)
+    inline v8::Handle<v8::Value> v8StringOrNull(const String& str)
     {
-        return str.isNull() ? v8::Handle<v8::Value>(v8::Null()) : v8::Handle<v8::Value>(v8String(str, isolate));
+        return str.isNull() ? v8::Handle<v8::Value>(v8::Null()) : v8::Handle<v8::Value>(v8String(str));
     }
 
-    inline v8::Handle<v8::Value> v8StringOrUndefined(const String& str, v8::Isolate* isolate = 0)
+    inline v8::Handle<v8::Value> v8StringOrUndefined(const String& str)
     {
-        return str.isNull() ? v8::Handle<v8::Value>(v8::Undefined()) : v8::Handle<v8::Value>(v8String(str, isolate));
+        return str.isNull() ? v8::Handle<v8::Value>(v8::Undefined()) : v8::Handle<v8::Value>(v8String(str));
     }
 
-    inline v8::Handle<v8::Value> v8StringOrFalse(const String& str, v8::Isolate* isolate = 0)
+    inline v8::Handle<v8::Value> v8StringOrFalse(const String& str)
     {
-        return str.isNull() ? v8::Handle<v8::Value>(v8::False()) : v8::Handle<v8::Value>(v8String(str, isolate));
+        return str.isNull() ? v8::Handle<v8::Value>(v8::False()) : v8::Handle<v8::Value>(v8String(str));
     }
 
     template <class T> v8::Handle<v8::Value> v8NumberArray(const Vector<T>& values)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to