https://bugs.webkit.org/show_bug.cgi?id=144932
Reviewed by Dan Bernstein.
This change is good if it compiles and links successfully.
* bindings/scripts/CodeGeneratorJS.pm:
(ExportLabelForClass):
Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
* bindings/scripts/test/JS/JSTestEventConstructor.h:
* bindings/scripts/test/JS/JSTestEventTarget.h:
* bindings/scripts/test/JS/JSTestException.h:
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.h:
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
* bindings/scripts/test/JS/JSTestTypedefs.h:
* bindings/scripts/test/JS/JSattribute.h:
* bindings/scripts/test/JS/JSreadonly.h:
Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@184228
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-05-12 Alex Christensen <achristensen@webkit.org>
+
+ Don't export all JS bindings classes.
+ https://bugs.webkit.org/show_bug.cgi?id=144932
+
+ Reviewed by Dan Bernstein.
+
+ This change is good if it compiles and links successfully.
+
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (ExportLabelForClass):
+ Add a list of the JS bindings classes that need WEBCORE_EXPORT to prevent exporting too many symbols from WebCore.
+ * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
+ * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
+ * bindings/scripts/test/JS/JSTestEventConstructor.h:
+ * bindings/scripts/test/JS/JSTestEventTarget.h:
+ * bindings/scripts/test/JS/JSTestException.h:
+ * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
+ * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
+ * bindings/scripts/test/JS/JSTestNamedConstructor.h:
+ * bindings/scripts/test/JS/JSTestNode.h:
+ * bindings/scripts/test/JS/JSTestNondeterministic.h:
+ * bindings/scripts/test/JS/JSTestObj.h:
+ * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
+ * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
+ * bindings/scripts/test/JS/JSTestTypedefs.h:
+ * bindings/scripts/test/JS/JSattribute.h:
+ * bindings/scripts/test/JS/JSreadonly.h:
+ Update bindings tests to remove WEBCORE_EXPORT from most of the tests,
+ but keep one test with WEBCORE_EXPORT and one test with WEBCORE_TESTSUPPORT_EXPORT.
+
2015-05-12 Brent Fulgham <bfulgham@apple.com>
[Win] Update DXSDK_DIR settings for build system.
"JSMallocStatistics" => 1,
"JSMemoryInfo" => 1,
"JSTypeConversions" => 1,
+
+ # This is for the bindings tests.
+ "JSTestNode" => 1,
+);
+
+my %classesNeedingWebCoreExport = (
+ "JSAudioContext" => 1,
+ "JSClientRect" => 1,
+ "JSClientRectList" => 1,
+ "JSCSSStyleDeclaration" => 1,
+ "JSDocument" => 1,
+ "JSDOMWindow" => 1,
+ "JSElement" => 1,
+ "JSFile" => 1,
+ "JSHTMLElement" => 1,
+ "JSHTMLMediaElement" => 1,
+ "JSNode" => 1,
+ "JSNotification" => 1,
+ "JSRange" => 1,
+ "JSScriptProfile" => 1,
+ "JSScriptProfileNode" => 1,
+ "JSTimeRanges" => 1,
+ "JSXMLHttpRequest" => 1,
+
+ # This is for the bindings tests.
+ "JSTestInterface" => 1,
);
sub ExportLabelForClass
{
my $class = shift;
- return "WEBCORE_TESTSUPPORT_EXPORT" if $testSupportClasses{$class};
- return "WEBCORE_EXPORT"
+ return "WEBCORE_TESTSUPPORT_EXPORT " if $testSupportClasses{$class};
+ return "WEBCORE_EXPORT " if $classesNeedingWebCoreExport{$class};
+ return "";
}
sub AddIncludesForType
my $exportLabel = ExportLabelForClass($className);
# Class declaration
- push(@headerContent, "class $exportLabel $className : public $parentClassName {\n");
+ push(@headerContent, "class $exportLabel$className : public $parentClassName {\n");
# Static create methods
push(@headerContent, "public:\n");
if ($implType eq "Node" or $implType eq "NodeList") {
push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
} else {
- push(@headerContent, "$exportLabel JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
+ push(@headerContent, $exportLabel."JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
}
push(@headerContent, "inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, $implType& impl) { return toJS(exec, globalObject, &impl); }\n");
}
namespace WebCore {
-class WEBCORE_EXPORT JSTestActiveDOMObject : public JSDOMWrapper {
+class JSTestActiveDOMObject : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestActiveDOMObject* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestActiveDOMObject>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestActiveDOMObject*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestActiveDOMObject& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestCustomNamedGetter : public JSDOMWrapper {
+class JSTestCustomNamedGetter : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestCustomNamedGetter* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestCustomNamedGetter>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestCustomNamedGetter*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestCustomNamedGetter& impl) { return toJS(exec, globalObject, &impl); }
class JSDictionary;
-class WEBCORE_EXPORT JSTestEventConstructor : public JSDOMWrapper {
+class JSTestEventConstructor : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestEventConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestEventConstructor>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventConstructor*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestEventConstructor& impl) { return toJS(exec, globalObject, &impl); }
bool fillTestEventConstructorInit(TestEventConstructorInit&, JSDictionary&);
namespace WebCore {
-class WEBCORE_EXPORT JSTestEventTarget : public JSDOMWrapper {
+class JSTestEventTarget : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestEventTarget* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestEventTarget>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestEventTarget*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestEventTarget& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestException : public JSDOMWrapper {
+class JSTestException : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestException* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestException>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestException*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestException*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestException& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestGenerateIsReachable : public JSDOMWrapper {
+class JSTestGenerateIsReachable : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestGenerateIsReachable* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestGenerateIsReachable>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestGenerateIsReachable*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestGenerateIsReachable& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestMediaQueryListListener : public JSDOMWrapper {
+class JSTestMediaQueryListListener : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestMediaQueryListListener* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestMediaQueryListListener>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestMediaQueryListListener*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestMediaQueryListListener& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestNamedConstructor : public JSDOMWrapper {
+class JSTestNamedConstructor : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestNamedConstructor* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNamedConstructor>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNamedConstructor*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestNamedConstructor& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestNode : public JSNode {
+class WEBCORE_TESTSUPPORT_EXPORT JSTestNode : public JSNode {
public:
typedef JSNode Base;
static JSTestNode* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNode>&& impl)
namespace WebCore {
-class WEBCORE_EXPORT JSTestNondeterministic : public JSDOMWrapper {
+class JSTestNondeterministic : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestNondeterministic* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestNondeterministic>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestNondeterministic*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestNondeterministic& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestObj : public JSDOMWrapper {
+class JSTestObj : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestObj* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestObj>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestObj*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestObj& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestOverloadedConstructors : public JSDOMWrapper {
+class JSTestOverloadedConstructors : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestOverloadedConstructors* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestOverloadedConstructors>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestOverloadedConstructors*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestOverloadedConstructors& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestSerializedScriptValueInterface : public JSDOMWrapper {
+class JSTestSerializedScriptValueInterface : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestSerializedScriptValueInterface* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestSerializedScriptValueInterface>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestSerializedScriptValueInterface*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestSerializedScriptValueInterface& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSTestTypedefs : public JSDOMWrapper {
+class JSTestTypedefs : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSTestTypedefs* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<TestTypedefs>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, TestTypedefs*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, TestTypedefs& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSattribute : public JSDOMWrapper {
+class JSattribute : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSattribute* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<attribute>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, attribute*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, attribute*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, attribute& impl) { return toJS(exec, globalObject, &impl); }
namespace WebCore {
-class WEBCORE_EXPORT JSreadonly : public JSDOMWrapper {
+class JSreadonly : public JSDOMWrapper {
public:
typedef JSDOMWrapper Base;
static JSreadonly* create(JSC::Structure* structure, JSDOMGlobalObject* globalObject, Ref<readonly>&& impl)
return &owner.get();
}
-WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
+JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, readonly*);
inline JSC::JSValue toJS(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, readonly& impl) { return toJS(exec, globalObject, &impl); }