Diff
Modified: trunk/Source/WebCore/ChangeLog (125483 => 125484)
--- trunk/Source/WebCore/ChangeLog 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/ChangeLog 2012-08-14 00:55:37 UTC (rev 125484)
@@ -1,5 +1,41 @@
2012-08-13 Kentaro Hara <[email protected]>
+ [V8] Remove [TreatReturnedNullAs=False]
+ https://bugs.webkit.org/show_bug.cgi?id=93835
+
+ Reviewed by Adam Barth.
+
+ [TreatReturnedNullAs=False] is neither defined in the Web IDL spec
+ nor used in any WebKit IDL file.
+
+ No tests. No change in behavior.
+
+ * WebCore.order:
+ * bindings/js/JSDOMBinding.cpp:
+ * bindings/js/JSDOMBinding.h:
+ (WebCore):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (NativeToJSValue):
+ * bindings/scripts/CodeGeneratorV8.pm:
+ (NativeToJSValue):
+ * bindings/scripts/IDLAttributes.txt:
+ * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
+ * bindings/scripts/test/CPP/WebDOMTestObj.h:
+ * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+ * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore):
+ * bindings/scripts/test/JS/JSTestObj.h:
+ (WebCore):
+ * bindings/scripts/test/ObjC/DOMTestObj.h:
+ * bindings/scripts/test/ObjC/DOMTestObj.mm:
+ * bindings/scripts/test/TestObj.idl:
+ * bindings/scripts/test/V8/V8TestObj.cpp:
+ (WebCore::ConfigureV8TestObjTemplate):
+ * bindings/v8/V8Binding.h:
+
+2012-08-13 Kentaro Hara <[email protected]>
+
[V8] Rename v8ValueToWebCoreDOMStringList() to toDOMStringList()
https://bugs.webkit.org/show_bug.cgi?id=93839
Modified: trunk/Source/WebCore/WebCore.order (125483 => 125484)
--- trunk/Source/WebCore/WebCore.order 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/WebCore.order 2012-08-14 00:55:37 UTC (rev 125484)
@@ -14468,7 +14468,6 @@
__ZN7WebCore8Document17queryCommandValueERKN3WTF6StringE
__ZNK7WebCore6Editor7Command5valueEPNS_5EventE
__ZN7WebCoreL17stateStyleWithCSSEPNS_5FrameEPNS_5EventE
-__ZN7WebCore15jsStringOrFalseEPN3JSC9ExecStateERKN3WTF6StringE
__ZN7WebCoreL19executeStyleWithCSSEPNS_5FrameEPNS_5EventENS_19EditorCommandSourceERKN3WTF6StringE
__ZNK7WebCore18HTMLDocumentParser17isExecutingScriptEv
__ZNK7WebCore5Range21compareBoundaryPointsENS0_10CompareHowEPKS0_Ri
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (125483 => 125484)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2012-08-14 00:55:37 UTC (rev 125484)
@@ -76,13 +76,6 @@
return jsString(exec, s);
}
-JSValue jsStringOrFalse(ExecState* exec, const String& s)
-{
- if (s.isNull())
- return jsBoolean(false);
- return jsString(exec, s);
-}
-
JSValue jsString(ExecState* exec, const KURL& url)
{
return jsString(exec, url.string());
@@ -102,13 +95,6 @@
return jsString(exec, url.string());
}
-JSValue jsStringOrFalse(ExecState* exec, const KURL& url)
-{
- if (url.isNull())
- return jsBoolean(false);
- return jsString(exec, url.string());
-}
-
AtomicStringImpl* findAtomicString(PropertyName propertyName)
{
StringImpl* impl = propertyName.publicName();
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (125483 => 125484)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2012-08-14 00:55:37 UTC (rev 125484)
@@ -247,9 +247,6 @@
JSC::JSValue jsStringOrUndefined(JSC::ExecState*, const String&); // undefined if the string is null
JSC::JSValue jsStringOrUndefined(JSC::ExecState*, const KURL&); // undefined if the URL is null
- JSC::JSValue jsStringOrFalse(JSC::ExecState*, const String&); // boolean false if the string is null
- JSC::JSValue jsStringOrFalse(JSC::ExecState*, const KURL&); // boolean false if the URL is null
-
// See _javascript_Core for explanation: Should be used for any string that is already owned by another
// object, to let the engine know that collecting the JSString wrapper is unlikely to save memory.
JSC::JSValue jsOwnedStringOrNull(JSC::ExecState*, const String&);
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2012-08-14 00:55:37 UTC (rev 125484)
@@ -3118,7 +3118,6 @@
if (defined $conv) {
return "jsStringOrNull(exec, $value)" if $conv eq "Null";
return "jsStringOrUndefined(exec, $value)" if $conv eq "Undefined";
- return "jsStringOrFalse(exec, $value)" if $conv eq "False";
die "Unknown value for TreatReturnedNullStringAs extended attribute";
}
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorV8.pm 2012-08-14 00:55:37 UTC (rev 125484)
@@ -4055,7 +4055,6 @@
if (defined $conv) {
return "v8StringOrNull($value$getIsolateArg)" if $conv eq "Null";
return "v8StringOrUndefined($value$getIsolateArg)" if $conv eq "Undefined";
- return "v8StringOrFalse($value$getIsolateArg)" if $conv eq "False";
die "Unknown value for TreatReturnedNullStringAs extended attribute";
}
Modified: trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/IDLAttributes.txt 2012-08-14 00:55:37 UTC (rev 125484)
@@ -104,7 +104,7 @@
SuppressToJSObject
TransferList=*
TreatNullAs=NullString
-TreatReturnedNullStringAs=False|Null|Undefined
+TreatReturnedNullStringAs=Null|Undefined
TreatUndefinedAs=NullString
TypedArray=*
URL
Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.cpp 2012-08-14 00:55:37 UTC (rev 125484)
@@ -37,7 +37,6 @@
#include "WebDOMa.h"
#include "WebDOMb.h"
#include "WebDOMbool.h"
-#include "WebDOMc.h"
#include "WebDOMd.h"
#include "WebDOMe.h"
#include "WebExceptionHandler.h"
@@ -45,7 +44,6 @@
#include "a.h"
#include "b.h"
#include "bool.h"
-#include "c.h"
#include "d.h"
#include "e.h"
#include "wtf/text/AtomicString.h"
@@ -902,14 +900,6 @@
impl()->convert2(toWebCore());
}
-void WebDOMTestObj::convert3(const WebDOMc& )
-{
- if (!impl())
- return;
-
- impl()->convert3(toWebCore());
-}
-
void WebDOMTestObj::convert4(const WebDOMd& )
{
if (!impl())
Modified: trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/CPP/WebDOMTestObj.h 2012-08-14 00:55:37 UTC (rev 125484)
@@ -40,7 +40,6 @@
class WebDOMa;
class WebDOMb;
class WebDOMbool;
-class WebDOMc;
class WebDOMd;
class WebDOMe;
@@ -182,7 +181,6 @@
#endif
void convert1(const WebDOMa& );
void convert2(const WebDOMb& );
- void convert3(const WebDOMc& );
void convert4(const WebDOMd& );
void convert5(const WebDOMe& );
WebDOMSVGPoint mutablePointFunction();
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp 2012-08-14 00:55:37 UTC (rev 125484)
@@ -48,8 +48,6 @@
#include "webkit/WebKitDOMbPrivate.h"
#include "webkit/WebKitDOMbool.h"
#include "webkit/WebKitDOMboolPrivate.h"
-#include "webkit/WebKitDOMc.h"
-#include "webkit/WebKitDOMcPrivate.h"
#include "webkit/WebKitDOMd.h"
#include "webkit/WebKitDOMdPrivate.h"
#include "webkit/WebKitDOMe.h"
@@ -1360,21 +1358,6 @@
}
void
-webkit_dom_test_obj_convert3(WebKitDOMTestObj* self, WebKitDOMc* )
-{
- g_return_if_fail(self);
- WebCore::JSMainThreadNullState state;
- WebCore::TestObj* item = WebKit::core(self);
- g_return_if_fail();
- WebCore::c* converted = 0;
- if () {
- converted = WebKit::core();
- g_return_if_fail(converted);
- }
- item->convert3(converted);
-}
-
-void
webkit_dom_test_obj_convert4(WebKitDOMTestObj* self, WebKitDOMd* )
{
g_return_if_fail(self);
Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h 2012-08-14 00:55:37 UTC (rev 125484)
@@ -420,17 +420,6 @@
webkit_dom_test_obj_convert2(WebKitDOMTestObj* self, WebKitDOMb* );
/**
- * webkit_dom_test_obj_convert3:
- * @self: A #WebKitDOMTestObj
- * @: A #WebKitDOMc
- *
- * Returns:
- *
-**/
-WEBKIT_API void
-webkit_dom_test_obj_convert3(WebKitDOMTestObj* self, WebKitDOMc* );
-
-/**
* webkit_dom_test_obj_convert4:
* @self: A #WebKitDOMTestObj
* @: A #WebKitDOMd
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp 2012-08-14 00:55:37 UTC (rev 125484)
@@ -41,7 +41,6 @@
#include "JSa.h"
#include "JSb.h"
#include "JSbool.h"
-#include "JSc.h"
#include "JSd.h"
#include "JSe.h"
#include "KURL.h"
@@ -314,7 +313,6 @@
{ "getSVGDocument", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionGetSVGDocument), (intptr_t)0, NoIntrinsic },
{ "convert1", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert1), (intptr_t)1, NoIntrinsic },
{ "convert2", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert2), (intptr_t)1, NoIntrinsic },
- { "convert3", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert3), (intptr_t)1, NoIntrinsic },
{ "convert4", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert4), (intptr_t)1, NoIntrinsic },
{ "convert5", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionConvert5), (intptr_t)1, NoIntrinsic },
{ "mutablePointFunction", DontDelete | JSC::Function, (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMutablePointFunction), (intptr_t)0, NoIntrinsic },
@@ -324,7 +322,7 @@
{ 0, 0, 0, 0, NoIntrinsic }
};
-static const HashTable JSTestObjPrototypeTable = { 267, 255, JSTestObjPrototypeTableValues, 0 };
+static const HashTable JSTestObjPrototypeTable = { 266, 255, JSTestObjPrototypeTableValues, 0 };
const ClassInfo JSTestObjPrototype::s_info = { "TestObjectPrototype", &Base::s_info, &JSTestObjPrototypeTable, 0, CREATE_METHOD_TABLE(JSTestObjPrototype) };
JSObject* JSTestObjPrototype::self(ExecState* exec, JSGlobalObject* globalObject)
@@ -2486,23 +2484,6 @@
return JSValue::encode(jsUndefined());
}
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert3(ExecState* exec)
-{
- JSValue thisValue = exec->hostThisValue();
- if (!thisValue.inherits(&JSTestObj::s_info))
- return throwVMTypeError(exec);
- JSTestObj* castedThis = jsCast<JSTestObj*>(asObject(thisValue));
- ASSERT_GC_OBJECT_INHERITS(castedThis, &JSTestObj::s_info);
- TestObj* impl = static_cast<TestObj*>(castedThis->impl());
- if (exec->argumentCount() < 1)
- return throwVMError(exec, createNotEnoughArgumentsError(exec));
- c* (toc(MAYBE_MISSING_PARAMETER(exec, 0, DefaultIsUndefined)));
- if (exec->hadException())
- return JSValue::encode(jsUndefined());
- impl->convert3();
- return JSValue::encode(jsUndefined());
-}
-
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h 2012-08-14 00:55:37 UTC (rev 125484)
@@ -209,7 +209,6 @@
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionGetSVGDocument(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert1(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert2(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert3(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert4(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionConvert5(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMutablePointFunction(JSC::ExecState*);
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h 2012-08-14 00:55:37 UTC (rev 125484)
@@ -40,7 +40,6 @@
@class DOMa;
@class DOMb;
@class DOMbool;
-@class DOMc;
@class DOMd;
@class DOMe;
@class NSString;
@@ -220,7 +219,6 @@
- (DOMSVGDocument *)getSVGDocument;
- (void)convert1:(DOMa *);
- (void)convert2:(DOMb *);
-- (void)convert3:(DOMc *);
- (void)convert4:(DOMd *);
- (void)convert5:(DOMe *);
- (DOMSVGPoint *)mutablePointFunction;
Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm 2012-08-14 00:55:37 UTC (rev 125484)
@@ -47,7 +47,6 @@
#import "DOMaInternal.h"
#import "DOMbInternal.h"
#import "DOMboolInternal.h"
-#import "DOMcInternal.h"
#import "DOMdInternal.h"
#import "DOMeInternal.h"
#import "Dictionary.h"
@@ -72,7 +71,6 @@
#import "a.h"
#import "b.h"
#import "bool.h"
-#import "c.h"
#import "d.h"
#import "e.h"
#import <wtf/GetPtr.h>
@@ -1003,12 +1001,6 @@
IMPL->convert2(core());
}
-- (void)convert3:(DOMc *)
-{
- WebCore::JSMainThreadNullState state;
- IMPL->convert3(core());
-}
-
- (void)convert4:(DOMd *)
{
WebCore::JSMainThreadNullState state;
Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl 2012-08-14 00:55:37 UTC (rev 125484)
@@ -226,7 +226,6 @@
void convert1(in [TreatReturnedNullStringAs=Null] a);
void convert2(in [TreatReturnedNullStringAs=Undefined] b);
- void convert3(in [TreatReturnedNullStringAs=False] c);
void convert4(in [TreatNullAs=NullString] d);
void convert5(in [TreatNullAs=NullString, TreatUndefinedAs=NullString] e);
Modified: trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp (125483 => 125484)
--- trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/scripts/test/V8/V8TestObj.cpp 2012-08-14 00:55:37 UTC (rev 125484)
@@ -53,7 +53,6 @@
#include "V8any.h"
#include "V8b.h"
#include "V8bool.h"
-#include "V8c.h"
#include "V8d.h"
#include "V8e.h"
#include <wtf/Float32Array.h>
@@ -1858,17 +1857,6 @@
return v8Undefined();
}
-static v8::Handle<v8::Value> convert3Callback(const v8::Arguments& args)
-{
- INC_STATS("DOM.TestObj.convert3");
- if (args.Length() < 1)
- return V8Proxy::throwNotEnoughArgumentsError(args.GetIsolate());
- TestObj* imp = V8TestObj::toNative(args.Holder());
- EXCEPTION_BLOCK(c*, , V8c::HasInstance(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined)) ? V8c::toNative(v8::Handle<v8::Object>::Cast(MAYBE_MISSING_PARAMETER(args, 0, DefaultIsUndefined))) : 0);
- imp->convert3();
- return v8Undefined();
-}
-
static v8::Handle<v8::Value> convert4Callback(const v8::Arguments& args)
{
INC_STATS("DOM.TestObj.convert4");
@@ -2252,12 +2240,6 @@
v8::Handle<v8::Signature> convert2Signature = v8::Signature::New(desc, convert2Argc, convert2Argv);
proto->Set(v8::String::New("convert2"), v8::FunctionTemplate::New(TestObjV8Internal::convert2Callback, v8Undefined(), convert2Signature));
- // Custom Signature 'convert3'
- const int convert3Argc = 1;
- v8::Handle<v8::FunctionTemplate> convert3Argv[convert3Argc] = { V8c::GetRawTemplate() };
- v8::Handle<v8::Signature> convert3Signature = v8::Signature::New(desc, convert3Argc, convert3Argv);
- proto->Set(v8::String::New("convert3"), v8::FunctionTemplate::New(TestObjV8Internal::convert3Callback, v8Undefined(), convert3Signature));
-
// Custom Signature 'convert4'
const int convert4Argc = 1;
v8::Handle<v8::FunctionTemplate> convert4Argv[convert4Argc] = { V8d::GetRawTemplate() };
Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (125483 => 125484)
--- trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-14 00:53:23 UTC (rev 125483)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-14 00:55:37 UTC (rev 125484)
@@ -366,11 +366,6 @@
return str.isNull() ? v8::Handle<v8::Value>(v8::Undefined()) : v8::Handle<v8::Value>(v8String(str, isolate));
}
- inline v8::Handle<v8::Value> v8StringOrFalse(const String& str, v8::Isolate* isolate = 0)
- {
- return str.isNull() ? v8::Handle<v8::Value>(v8Boolean(false)) : v8::Handle<v8::Value>(v8String(str, isolate));
- }
-
inline double toWebCoreDate(v8::Handle<v8::Value> object)
{
return (object->IsDate() || object->IsNumber()) ? object->NumberValue() : std::numeric_limits<double>::quiet_NaN();