Loading browser/devtools/debugger/VariablesView.jsm +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ VariablesView.prototype = { */ empty: function VV_empty(aTimeout = LAZY_EMPTY_DELAY) { // If there are no items in this container, emptying is useless. if (!this._store.size()) { if (!this._store.size) { return; } // Check if this empty operation may be executed lazily. Loading Loading @@ -110,7 +110,7 @@ VariablesView.prototype = { this._parent.removeChild(prevList); this._parent.appendChild(currList); if (!this._store.size()) { if (!this._store.size) { this._appendEmptyNotice(); } }.bind(this), aTimeout); Loading browser/devtools/debugger/debugger-panes.js +3 −3 Original line number Diff line number Diff line Loading @@ -812,7 +812,7 @@ create({ constructor: GlobalSearchView, proto: MenuContainer.prototype }, { */ _fetchSources: function DVGS__fetchSources(aFetchCallback, aFetchedCallback, aLocations) { // If all the sources were already fetched, then don't do anything. if (this._cache.size() == aLocations.length) { if (this._cache.size == aLocations.length) { aFetchedCallback(); return; } Loading Loading @@ -840,7 +840,7 @@ create({ constructor: GlobalSearchView, proto: MenuContainer.prototype }, { this._cache.set(aLocation, aContents); // Check if all sources were fetched and stored in the cache. if (this._cache.size() == this._sourcesCount) { if (this._cache.size == this._sourcesCount) { this._onFetchSourcesFinished(); } }, Loading Loading @@ -1151,7 +1151,7 @@ GlobalResults.prototype = { /** * Gets the number of source results in this store. */ get itemCount() this._store.size(), get itemCount() this._store.size, _store: null }; Loading browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ function testLocationChange() window.addEventListener("Debugger:GlobalSearch:CacheCleared", function _onCacheCleared(aEvent) { window.removeEventListener(aEvent.type, _onCacheCleared); is(gSearchView._cache.size(), 0, is(gSearchView._cache.size, 0, "The scripts sources cache for global searching should be cleared after a page navigation.") cacheCleared = true; Loading js/src/builtin/MapObject.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -947,8 +947,12 @@ Class MapObject::class_ = { mark }; JSPropertySpec MapObject::properties[] = { JS_PSG("size", size, 0), JS_PS_END }; JSFunctionSpec MapObject::methods[] = { JS_FN("size", size, 0, 0), JS_FN("get", get, 1, 0), JS_FN("has", has, 1, 0), JS_FN("set", set, 2, 0), Loading @@ -960,7 +964,7 @@ JSFunctionSpec MapObject::methods[] = { static JSObject * InitClass(JSContext *cx, Handle<GlobalObject*> global, Class *clasp, JSProtoKey key, Native construct, JSFunctionSpec *methods) JSPropertySpec *properties, JSFunctionSpec *methods) { Rooted<JSObject*> proto(cx, global->createBlankPrototype(cx, clasp)); if (!proto) Loading @@ -970,7 +974,7 @@ InitClass(JSContext *cx, Handle<GlobalObject*> global, Class *clasp, JSProtoKey Rooted<JSFunction*> ctor(cx, global->createConstructor(cx, construct, ClassName(key, cx), 1)); if (!ctor || !LinkConstructorAndPrototype(cx, ctor, proto) || !DefinePropertiesAndBrand(cx, proto, NULL, methods) || !DefinePropertiesAndBrand(cx, proto, properties, methods) || !DefineConstructorAndPrototype(cx, global, key, ctor, proto)) { return NULL; Loading @@ -982,7 +986,7 @@ JSObject * MapObject::initClass(JSContext *cx, JSObject *obj) { Rooted<GlobalObject*> global(cx, &obj->asGlobal()); return InitClass(cx, global, &class_, JSProto_Map, construct, methods); return InitClass(cx, global, &class_, JSProto_Map, construct, properties, methods); } template <class Range> Loading Loading @@ -1410,8 +1414,12 @@ Class SetObject::class_ = { mark }; JSPropertySpec SetObject::properties[] = { JS_PSG("size", size, 0), JS_PS_END }; JSFunctionSpec SetObject::methods[] = { JS_FN("size", size, 0, 0), JS_FN("has", has, 1, 0), JS_FN("add", add, 1, 0), JS_FN("delete", delete_, 1, 0), Loading @@ -1424,7 +1432,7 @@ JSObject * SetObject::initClass(JSContext *cx, JSObject *obj) { Rooted<GlobalObject*> global(cx, &obj->asGlobal()); return InitClass(cx, global, &class_, JSProto_Set, construct, methods); return InitClass(cx, global, &class_, JSProto_Set, construct, properties, methods); } void Loading js/src/builtin/MapObject.h +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ class MapObject : public JSObject { static JSObject *initClass(JSContext *cx, JSObject *obj); static Class class_; private: static JSPropertySpec properties[]; static JSFunctionSpec methods[]; ValueMap *getData() { return static_cast<ValueMap *>(getPrivate()); } static ValueMap & extract(CallReceiver call); Loading Loading @@ -114,6 +115,7 @@ class SetObject : public JSObject { static JSObject *initClass(JSContext *cx, JSObject *obj); static Class class_; private: static JSPropertySpec properties[]; static JSFunctionSpec methods[]; ValueSet *getData() { return static_cast<ValueSet *>(getPrivate()); } static ValueSet & extract(CallReceiver call); Loading Loading
browser/devtools/debugger/VariablesView.jsm +2 −2 Original line number Diff line number Diff line Loading @@ -61,7 +61,7 @@ VariablesView.prototype = { */ empty: function VV_empty(aTimeout = LAZY_EMPTY_DELAY) { // If there are no items in this container, emptying is useless. if (!this._store.size()) { if (!this._store.size) { return; } // Check if this empty operation may be executed lazily. Loading Loading @@ -110,7 +110,7 @@ VariablesView.prototype = { this._parent.removeChild(prevList); this._parent.appendChild(currList); if (!this._store.size()) { if (!this._store.size) { this._appendEmptyNotice(); } }.bind(this), aTimeout); Loading
browser/devtools/debugger/debugger-panes.js +3 −3 Original line number Diff line number Diff line Loading @@ -812,7 +812,7 @@ create({ constructor: GlobalSearchView, proto: MenuContainer.prototype }, { */ _fetchSources: function DVGS__fetchSources(aFetchCallback, aFetchedCallback, aLocations) { // If all the sources were already fetched, then don't do anything. if (this._cache.size() == aLocations.length) { if (this._cache.size == aLocations.length) { aFetchedCallback(); return; } Loading Loading @@ -840,7 +840,7 @@ create({ constructor: GlobalSearchView, proto: MenuContainer.prototype }, { this._cache.set(aLocation, aContents); // Check if all sources were fetched and stored in the cache. if (this._cache.size() == this._sourcesCount) { if (this._cache.size == this._sourcesCount) { this._onFetchSourcesFinished(); } }, Loading Loading @@ -1151,7 +1151,7 @@ GlobalResults.prototype = { /** * Gets the number of source results in this store. */ get itemCount() this._store.size(), get itemCount() this._store.size, _store: null }; Loading
browser/devtools/debugger/test/browser_dbg_scripts-searching-05.js +1 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,7 @@ function testLocationChange() window.addEventListener("Debugger:GlobalSearch:CacheCleared", function _onCacheCleared(aEvent) { window.removeEventListener(aEvent.type, _onCacheCleared); is(gSearchView._cache.size(), 0, is(gSearchView._cache.size, 0, "The scripts sources cache for global searching should be cleared after a page navigation.") cacheCleared = true; Loading
js/src/builtin/MapObject.cpp +14 −6 Original line number Diff line number Diff line Loading @@ -947,8 +947,12 @@ Class MapObject::class_ = { mark }; JSPropertySpec MapObject::properties[] = { JS_PSG("size", size, 0), JS_PS_END }; JSFunctionSpec MapObject::methods[] = { JS_FN("size", size, 0, 0), JS_FN("get", get, 1, 0), JS_FN("has", has, 1, 0), JS_FN("set", set, 2, 0), Loading @@ -960,7 +964,7 @@ JSFunctionSpec MapObject::methods[] = { static JSObject * InitClass(JSContext *cx, Handle<GlobalObject*> global, Class *clasp, JSProtoKey key, Native construct, JSFunctionSpec *methods) JSPropertySpec *properties, JSFunctionSpec *methods) { Rooted<JSObject*> proto(cx, global->createBlankPrototype(cx, clasp)); if (!proto) Loading @@ -970,7 +974,7 @@ InitClass(JSContext *cx, Handle<GlobalObject*> global, Class *clasp, JSProtoKey Rooted<JSFunction*> ctor(cx, global->createConstructor(cx, construct, ClassName(key, cx), 1)); if (!ctor || !LinkConstructorAndPrototype(cx, ctor, proto) || !DefinePropertiesAndBrand(cx, proto, NULL, methods) || !DefinePropertiesAndBrand(cx, proto, properties, methods) || !DefineConstructorAndPrototype(cx, global, key, ctor, proto)) { return NULL; Loading @@ -982,7 +986,7 @@ JSObject * MapObject::initClass(JSContext *cx, JSObject *obj) { Rooted<GlobalObject*> global(cx, &obj->asGlobal()); return InitClass(cx, global, &class_, JSProto_Map, construct, methods); return InitClass(cx, global, &class_, JSProto_Map, construct, properties, methods); } template <class Range> Loading Loading @@ -1410,8 +1414,12 @@ Class SetObject::class_ = { mark }; JSPropertySpec SetObject::properties[] = { JS_PSG("size", size, 0), JS_PS_END }; JSFunctionSpec SetObject::methods[] = { JS_FN("size", size, 0, 0), JS_FN("has", has, 1, 0), JS_FN("add", add, 1, 0), JS_FN("delete", delete_, 1, 0), Loading @@ -1424,7 +1432,7 @@ JSObject * SetObject::initClass(JSContext *cx, JSObject *obj) { Rooted<GlobalObject*> global(cx, &obj->asGlobal()); return InitClass(cx, global, &class_, JSProto_Set, construct, methods); return InitClass(cx, global, &class_, JSProto_Set, construct, properties, methods); } void Loading
js/src/builtin/MapObject.h +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ class MapObject : public JSObject { static JSObject *initClass(JSContext *cx, JSObject *obj); static Class class_; private: static JSPropertySpec properties[]; static JSFunctionSpec methods[]; ValueMap *getData() { return static_cast<ValueMap *>(getPrivate()); } static ValueMap & extract(CallReceiver call); Loading Loading @@ -114,6 +115,7 @@ class SetObject : public JSObject { static JSObject *initClass(JSContext *cx, JSObject *obj); static Class class_; private: static JSPropertySpec properties[]; static JSFunctionSpec methods[]; ValueSet *getData() { return static_cast<ValueSet *>(getPrivate()); } static ValueSet & extract(CallReceiver call); Loading