Skip to content

Commit 87f3b7f

Browse files
committed
Merge pull request cocos2d#1577 from pandamicro/develop
Reverse SpiderMonkey iOS build to v33
2 parents 44afeed + a8f9590 commit 87f3b7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1885
-2660
lines changed

frameworks/js-bindings/bindings/manual/ScriptingCore.cpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -593,19 +593,14 @@ void ScriptingCore::createGlobalContext() {
593593
#if defined(JS_GC_ZEAL) && defined(DEBUG)
594594
//JS_SetGCZeal(this->_cx, 2, JS_DEFAULT_ZEAL_FREQ);
595595
#endif
596-
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
597-
_global.emplace(_cx);
598-
#else
596+
599597
_global.construct(_cx);
600-
#endif
601598
_global.ref() = NewGlobalObject(_cx);
602599

603600
JSAutoCompartment ac(_cx, _global.ref());
604601

605-
#if (CC_TARGET_PLATFORM != CC_PLATFORM_IOS)
606602
// Removed in Firefox v34
607603
js::SetDefaultObjectForContext(_cx, _global.ref());
608-
#endif
609604

610605
for (std::vector<sc_register_sth>::iterator it = registrationList.begin(); it != registrationList.end(); it++) {
611606
sc_register_sth callback = *it;
@@ -1754,20 +1749,13 @@ bool JSBDebug_BufferWrite(JSContext* cx, unsigned argc, jsval* vp)
17541749

17551750
void ScriptingCore::enableDebugger(unsigned int port)
17561751
{
1757-
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
1758-
if (_debugGlobal.isNothing())
1759-
#else
17601752
if (_debugGlobal.empty())
1761-
#endif
17621753
{
17631754
JSAutoCompartment ac0(_cx, _global.ref().get());
17641755

17651756
JS_SetDebugMode(_cx, true);
1766-
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
1767-
_debugGlobal.emplace(_cx);
1768-
#else
1757+
17691758
_debugGlobal.construct(_cx);
1770-
#endif
17711759
_debugGlobal.ref() = NewGlobalObject(_cx, true);
17721760
// Adds the debugger object to root, otherwise it may be collected by GC.
17731761
//AddObjectRoot(_cx, &_debugGlobal); no need, it's persistent rooted now

frameworks/js-bindings/external/spidermonkey/include/ios/js-config-32.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
/* #undef JS_PUNBOX64 */
4848

4949
/* MOZILLA JSAPI version number components */
50-
#define MOZJS_MAJOR_VERSION 34
51-
#define MOZJS_MINOR_VERSION 0
50+
#define MOZJS_MAJOR_VERSION 33
51+
#define MOZJS_MINOR_VERSION 1
5252

5353
#endif /* js_config_h */

frameworks/js-bindings/external/spidermonkey/include/ios/js-config-64.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#define JS_PUNBOX64 1
4848

4949
/* MOZILLA JSAPI version number components */
50-
#define MOZJS_MAJOR_VERSION 34
51-
#define MOZJS_MINOR_VERSION 0
50+
#define MOZJS_MAJOR_VERSION 33
51+
#define MOZJS_MINOR_VERSION 1
5252

5353
#endif /* js_config_h */

frameworks/js-bindings/external/spidermonkey/include/ios/js.msg

Lines changed: 401 additions & 393 deletions
Large diffs are not rendered by default.

frameworks/js-bindings/external/spidermonkey/include/ios/js/CallArgs.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,6 @@ class MOZ_STACK_CLASS CallArgs : public detail::CallArgsBase<detail::IncludeUsed
362362
return args;
363363
}
364364

365-
public:
366-
/*
367-
* Returns true if there are at least |required| arguments passed in. If
368-
* false, it reports an error message on the context.
369-
*/
370-
bool requireAtLeast(JSContext *cx, const char *fnname, unsigned required);
371-
372365
};
373366

374367
MOZ_ALWAYS_INLINE CallArgs

frameworks/js-bindings/external/spidermonkey/include/ios/js/Class.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,8 @@ Valueify(const JSClass *c)
522522
* value of objects.
523523
*/
524524
enum ESClassValue {
525-
ESClass_Object, ESClass_Array, ESClass_Number, ESClass_String,
526-
ESClass_Boolean, ESClass_RegExp, ESClass_ArrayBuffer, ESClass_Date,
527-
ESClass_Set, ESClass_Map
525+
ESClass_Array, ESClass_Number, ESClass_String, ESClass_Boolean,
526+
ESClass_RegExp, ESClass_ArrayBuffer, ESClass_Date
528527
};
529528

530529
/*
@@ -540,10 +539,6 @@ ObjectClassIs(JSObject &obj, ESClassValue classValue, JSContext *cx);
540539
inline bool
541540
IsObjectWithClass(const JS::Value &v, ESClassValue classValue, JSContext *cx);
542541

543-
/* Fills |vp| with the unboxed value for boxed types, or undefined otherwise. */
544-
inline bool
545-
Unbox(JSContext *cx, JS::HandleObject obj, JS::MutableHandleValue vp);
546-
547542
} /* namespace js */
548543

549544
#endif /* js_Class_h */

frameworks/js-bindings/external/spidermonkey/include/ios/js/DebugAPI.h

Lines changed: 0 additions & 256 deletions
This file was deleted.

0 commit comments

Comments
 (0)