Title: [165741] trunk/Source
Revision
165741
Author
[email protected]
Date
2014-03-17 10:29:04 -0700 (Mon, 17 Mar 2014)

Log Message

Fix the !ENABLE(PROMISES) build
https://bugs.webkit.org/show_bug.cgi?id=130328

Patch by Zsolt Borbely <[email protected]> on 2014-03-17
Reviewed by Darin Adler.

Add missing ENABLE(PROMISES) guards.

Source/_javascript_Core:

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
* runtime/JSPromiseDeferred.cpp:
* runtime/JSPromiseDeferred.h:
* runtime/JSPromiseReaction.cpp:
* runtime/JSPromiseReaction.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WebCore:

* bindings/js/JSDOMPromise.cpp:
* bindings/js/JSDOMPromise.h:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (165740 => 165741)


--- trunk/Source/_javascript_Core/ChangeLog	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-03-17 17:29:04 UTC (rev 165741)
@@ -1,3 +1,24 @@
+2014-03-17  Zsolt Borbely  <[email protected]>
+
+        Fix the !ENABLE(PROMISES) build
+        https://bugs.webkit.org/show_bug.cgi?id=130328
+
+        Reviewed by Darin Adler.
+
+        Add missing ENABLE(PROMISES) guards.
+
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::reset):
+        (JSC::JSGlobalObject::visitChildren):
+        * runtime/JSGlobalObject.h:
+        * runtime/JSPromiseDeferred.cpp:
+        * runtime/JSPromiseDeferred.h:
+        * runtime/JSPromiseReaction.cpp:
+        * runtime/JSPromiseReaction.h:
+        * runtime/VM.cpp:
+        (JSC::VM::VM):
+        * runtime/VM.h:
+
 2014-03-16  Andreas Kling  <[email protected]>
 
         REGRESSION(r165703): JSC tests crashing in StringImpl::destroy().

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp	2014-03-17 17:29:04 UTC (rev 165741)
@@ -389,7 +389,9 @@
     m_syntaxErrorConstructor.set(vm, this, NativeErrorConstructor::create(vm, this, nativeErrorStructure, nativeErrorPrototypeStructure, ASCIILiteral("SyntaxError")));
     m_typeErrorConstructor.set(vm, this, NativeErrorConstructor::create(vm, this, nativeErrorStructure, nativeErrorPrototypeStructure, ASCIILiteral("TypeError")));
     m_URIErrorConstructor.set(vm, this, NativeErrorConstructor::create(vm, this, nativeErrorStructure, nativeErrorPrototypeStructure, ASCIILiteral("URIError")));
+#if ENABLE(PROMISES)
     m_promiseConstructor.set(vm, this, JSPromiseConstructor::create(vm, JSPromiseConstructor::createStructure(vm, this, m_functionPrototype.get()), m_promisePrototype.get()));
+#endif
 
     m_objectPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, objectConstructor, DontEnum);
     m_functionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, functionConstructor, DontEnum);
@@ -409,7 +411,9 @@
     putDirectWithoutTransition(vm, vm.propertyNames->SyntaxError, m_syntaxErrorConstructor.get(), DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->TypeError, m_typeErrorConstructor.get(), DontEnum);
     putDirectWithoutTransition(vm, vm.propertyNames->URIError, m_URIErrorConstructor.get(), DontEnum);
+#if ENABLE(PROMISES)
     putDirectWithoutTransition(vm, vm.propertyNames->Promise, m_promiseConstructor.get(), DontEnum);
+#endif
 
 
 #define PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName) \
@@ -636,7 +640,9 @@
     visitor.append(&thisObject->m_typeErrorConstructor);
     visitor.append(&thisObject->m_URIErrorConstructor);
     visitor.append(&thisObject->m_objectConstructor);
+#if ENABLE(PROMISES)
     visitor.append(&thisObject->m_promiseConstructor);
+#endif
 
     visitor.append(&thisObject->m_evalFunction);
     visitor.append(&thisObject->m_callFunction);

Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.h (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.h	2014-03-17 17:29:04 UTC (rev 165741)
@@ -164,7 +164,9 @@
     WriteBarrier<NativeErrorConstructor> m_syntaxErrorConstructor;
     WriteBarrier<NativeErrorConstructor> m_typeErrorConstructor;
     WriteBarrier<NativeErrorConstructor> m_URIErrorConstructor;
+#if ENABLE(PROMISES)
     WriteBarrier<JSPromiseConstructor> m_promiseConstructor;
+#endif
     WriteBarrier<ObjectConstructor> m_objectConstructor;
 
     WriteBarrier<JSFunction> m_evalFunction;
@@ -176,7 +178,9 @@
     WriteBarrier<FunctionPrototype> m_functionPrototype;
     WriteBarrier<ArrayPrototype> m_arrayPrototype;
     WriteBarrier<RegExpPrototype> m_regExpPrototype;
+#if ENABLE(PROMISES)
     WriteBarrier<JSPromisePrototype> m_promisePrototype;
+#endif
 
     WriteBarrier<Structure> m_withScopeStructure;
     WriteBarrier<Structure> m_strictEvalActivationStructure;
@@ -352,7 +356,9 @@
     NativeErrorConstructor* syntaxErrorConstructor() const { return m_syntaxErrorConstructor.get(); }
     NativeErrorConstructor* typeErrorConstructor() const { return m_typeErrorConstructor.get(); }
     NativeErrorConstructor* URIErrorConstructor() const { return m_URIErrorConstructor.get(); }
+#if ENABLE(PROMISES)
     JSPromiseConstructor* promiseConstructor() const { return m_promiseConstructor.get(); }
+#endif
 
     JSFunction* evalFunction() const { return m_evalFunction.get(); }
     JSFunction* callFunction() const { return m_callFunction.get(); }
@@ -373,7 +379,9 @@
     DatePrototype* datePrototype() const { return m_datePrototype.get(); }
     RegExpPrototype* regExpPrototype() const { return m_regExpPrototype.get(); }
     ErrorPrototype* errorPrototype() const { return m_errorPrototype.get(); }
+#if ENABLE(PROMISES)
     JSPromisePrototype* promisePrototype() const { return m_promisePrototype.get(); }
+#endif
 
     Structure* withScopeStructure() const { return m_withScopeStructure.get(); }
     Structure* strictEvalActivationStructure() const { return m_strictEvalActivationStructure.get(); }

Modified: trunk/Source/_javascript_Core/runtime/JSPromiseDeferred.cpp (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/JSPromiseDeferred.cpp	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/JSPromiseDeferred.cpp	2014-03-17 17:29:04 UTC (rev 165741)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "JSPromiseDeferred.h"
 
+#if ENABLE(PROMISES)
+
 #include "Error.h"
 #include "JSCJSValueInlines.h"
 #include "JSCellInlines.h"
@@ -244,3 +246,5 @@
 }
 
 } // namespace JSC
+
+#endif // ENABLE(PROMISES)

Modified: trunk/Source/_javascript_Core/runtime/JSPromiseDeferred.h (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/JSPromiseDeferred.h	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/JSPromiseDeferred.h	2014-03-17 17:29:04 UTC (rev 165741)
@@ -26,6 +26,8 @@
 #ifndef JSPromiseDeferred_h
 #define JSPromiseDeferred_h
 
+#if ENABLE(PROMISES)
+
 #include "JSCell.h"
 #include "Structure.h"
 
@@ -77,4 +79,6 @@
 
 } // namespace JSC
 
+#endif // ENABLE(PROMISES)
+
 #endif // JSPromiseDeferred_h

Modified: trunk/Source/_javascript_Core/runtime/JSPromiseReaction.cpp (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/JSPromiseReaction.cpp	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/JSPromiseReaction.cpp	2014-03-17 17:29:04 UTC (rev 165741)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "JSPromiseReaction.h"
 
+#if ENABLE(PROMISES)
+
 #include "Error.h"
 #include "JSCJSValueInlines.h"
 #include "JSCellInlines.h"
@@ -156,3 +158,5 @@
 }
 
 } // namespace JSC
+
+#endif // ENABLE(PROMISES)

Modified: trunk/Source/_javascript_Core/runtime/JSPromiseReaction.h (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/JSPromiseReaction.h	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/JSPromiseReaction.h	2014-03-17 17:29:04 UTC (rev 165741)
@@ -26,6 +26,8 @@
 #ifndef JSPromiseReaction_h
 #define JSPromiseReaction_h
 
+#if ENABLE(PROMISES)
+
 #include "JSCell.h"
 #include "Structure.h"
 
@@ -65,4 +67,6 @@
 
 } // namespace JSC
 
+#endif // ENABLE(PROMISES)
+
 #endif // JSPromiseReaction_h

Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/VM.cpp	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp	2014-03-17 17:29:04 UTC (rev 165741)
@@ -274,8 +274,10 @@
     propertyTableStructure.set(*this, PropertyTable::createStructure(*this, 0, jsNull()));
     mapDataStructure.set(*this, MapData::createStructure(*this, 0, jsNull()));
     weakMapDataStructure.set(*this, WeakMapData::createStructure(*this, 0, jsNull()));
+#if ENABLE(PROMISES)
     promiseDeferredStructure.set(*this, JSPromiseDeferred::createStructure(*this, 0, jsNull()));
     promiseReactionStructure.set(*this, JSPromiseReaction::createStructure(*this, 0, jsNull()));
+#endif
     iterationTerminator.set(*this, JSFinalObject::create(*this, JSFinalObject::createStructure(*this, 0, jsNull(), 1)));
     smallStrings.initializeCommonStrings(*this);
 

Modified: trunk/Source/_javascript_Core/runtime/VM.h (165740 => 165741)


--- trunk/Source/_javascript_Core/runtime/VM.h	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/_javascript_Core/runtime/VM.h	2014-03-17 17:29:04 UTC (rev 165741)
@@ -282,8 +282,10 @@
         Strong<Structure> propertyTableStructure;
         Strong<Structure> mapDataStructure;
         Strong<Structure> weakMapDataStructure;
+#if ENABLE(PROMISES)
         Strong<Structure> promiseDeferredStructure;
         Strong<Structure> promiseReactionStructure;
+#endif
         Strong<JSCell> iterationTerminator;
 
         IdentifierTable* identifierTable;

Modified: trunk/Source/WebCore/ChangeLog (165740 => 165741)


--- trunk/Source/WebCore/ChangeLog	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/WebCore/ChangeLog	2014-03-17 17:29:04 UTC (rev 165741)
@@ -1,3 +1,15 @@
+2014-03-17  Zsolt Borbely  <[email protected]>
+
+        Fix the !ENABLE(PROMISES) build
+        https://bugs.webkit.org/show_bug.cgi?id=130328
+
+        Reviewed by Darin Adler.
+
+        Add missing ENABLE(PROMISES) guards.
+
+        * bindings/js/JSDOMPromise.cpp:
+        * bindings/js/JSDOMPromise.h:
+
 2014-03-17  Gurpreet Kaur  <[email protected]>
 
         Safari should not render a cell if the <td> is empty

Modified: trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp (165740 => 165741)


--- trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromise.cpp	2014-03-17 17:29:04 UTC (rev 165741)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "JSDOMPromise.h"
 
+#if ENABLE(PROMISES)
+
 using namespace JSC;
 
 namespace WebCore {
@@ -70,3 +72,5 @@
 }
 
 }
+
+#endif // ENABLE(PROMISES)

Modified: trunk/Source/WebCore/bindings/js/JSDOMPromise.h (165740 => 165741)


--- trunk/Source/WebCore/bindings/js/JSDOMPromise.h	2014-03-17 17:28:14 UTC (rev 165740)
+++ trunk/Source/WebCore/bindings/js/JSDOMPromise.h	2014-03-17 17:29:04 UTC (rev 165741)
@@ -26,6 +26,8 @@
 #ifndef JSDOMPromise_h
 #define JSDOMPromise_h
 
+#if ENABLE(PROMISES)
+
 #include "JSCryptoKey.h"
 #include "JSCryptoKeyPair.h"
 #include "JSDOMBinding.h"
@@ -113,4 +115,6 @@
 
 }
 
+#endif // ENABLE(PROMISES)
+
 #endif // JSDOMPromise_h
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to