Bug 656810 - Implement js::NumberObject. r=njn
This commit is contained in:
@@ -84,6 +84,7 @@
|
||||
#include "jsobjinlines.h"
|
||||
#include "jsstrinlines.h"
|
||||
|
||||
#include "vm/NumberObject-inl.h"
|
||||
#include "vm/String-inl.h"
|
||||
|
||||
using namespace js;
|
||||
@@ -1111,7 +1112,7 @@ js_InitNumberClass(JSContext *cx, JSObject *obj)
|
||||
JSObject *numberProto = global->createBlankPrototype(cx, &NumberClass);
|
||||
if (!numberProto)
|
||||
return NULL;
|
||||
numberProto->setPrimitiveThis(Int32Value(0));
|
||||
numberProto->asNumber()->setPrimitiveValue(0);
|
||||
|
||||
JSFunction *ctor = global->createConstructor(cx, Number, &NumberClass,
|
||||
CLASS_ATOM(cx, Number), 1);
|
||||
|
||||
Reference in New Issue
Block a user