author | Jon Coppeard <jcoppeard@mozilla.com> |
Wed, 19 Jun 2013 11:32:27 +0100 | |
changeset 135615 | 693f9855e2265c04f2123d35a508a8982ff26d1d |
parent 135614 | 75b8543e2b045f326a43cde164fbf62b37015fd9 |
child 135616 | f126bff5d429985a64ce35ff392e7bee01727f21 |
push id | 24847 |
push user | kwierso@gmail.com |
push date | Wed, 19 Jun 2013 23:38:15 +0000 |
treeherder | mozilla-central@8ea92aeab783 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bz |
bugs | 884371 |
milestone | 24.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/caps/include/nsScriptSecurityManager.h +++ b/caps/include/nsScriptSecurityManager.h @@ -369,17 +369,17 @@ private: nsScriptSecurityManager(); virtual ~nsScriptSecurityManager(); bool SubjectIsPrivileged(); static JSBool CheckObjectAccess(JSContext *cx, JSHandleObject obj, JSHandleId id, JSAccessMode mode, - JSMutableHandleValue vp); + JS::MutableHandle<JS::Value> vp); // Decides, based on CSP, whether or not eval() and stuff can be executed. static JSBool ContentSecurityPolicyPermitsJSAction(JSContext *cx); // Returns null if a principal cannot be found; generally callers // should error out at that point. static nsIPrincipal* doGetObjectPrincipal(JS::Handle<JSObject*> obj);
--- a/caps/src/nsScriptSecurityManager.cpp +++ b/caps/src/nsScriptSecurityManager.cpp @@ -481,17 +481,17 @@ nsScriptSecurityManager::ContentSecurity return evalOK; } JSBool nsScriptSecurityManager::CheckObjectAccess(JSContext *cx, JSHandleObject obj, JSHandleId id, JSAccessMode mode, - JSMutableHandleValue vp) + JS::MutableHandle<JS::Value> vp) { // Get the security manager nsScriptSecurityManager *ssm = nsScriptSecurityManager::GetScriptSecurityManager(); NS_ASSERTION(ssm, "Failed to get security manager service"); if (!ssm) return JS_FALSE;
--- a/content/xbl/src/nsXBLDocumentInfo.cpp +++ b/content/xbl/src/nsXBLDocumentInfo.cpp @@ -114,33 +114,33 @@ nsXBLDocGlobalObject::doCheckAccess(JSCo nsresult rv = ssm->CheckPropertyAccess(cx, base, JS_GetClass(base)->name, id, accessType); return NS_SUCCEEDED(rv); } static JSBool nsXBLDocGlobalObject_getProperty(JSContext *cx, JSHandleObject obj, - JSHandleId id, JSMutableHandleValue vp) + JSHandleId id, JS::MutableHandle<JS::Value> vp) { return nsXBLDocGlobalObject:: doCheckAccess(cx, obj, id, nsIXPCSecurityManager::ACCESS_GET_PROPERTY); } static JSBool nsXBLDocGlobalObject_setProperty(JSContext *cx, JSHandleObject obj, - JSHandleId id, JSBool strict, JSMutableHandleValue vp) + JSHandleId id, JSBool strict, JS::MutableHandle<JS::Value> vp) { return nsXBLDocGlobalObject:: doCheckAccess(cx, obj, id, nsIXPCSecurityManager::ACCESS_SET_PROPERTY); } static JSBool nsXBLDocGlobalObject_checkAccess(JSContext *cx, JSHandleObject obj, JSHandleId id, - JSAccessMode mode, JSMutableHandleValue vp) + JSAccessMode mode, JS::MutableHandle<JS::Value> vp) { uint32_t translated; if (mode & JSACC_WRITE) { translated = nsIXPCSecurityManager::ACCESS_SET_PROPERTY; } else { translated = nsIXPCSecurityManager::ACCESS_GET_PROPERTY; }
--- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -2647,17 +2647,17 @@ static JSClass sGlobalScopePolluterClass JS_ConvertStub, nullptr }; // static JSBool nsWindowSH::GlobalScopePolluterGetProperty(JSContext *cx, JSHandleObject obj, - JSHandleId id, JSMutableHandleValue vp) + JSHandleId id, JS::MutableHandle<JS::Value> vp) { // Someone is accessing a element by referencing its name/id in the // global scope, do a security check to make sure that's ok. nsresult rv = sSecMan->CheckPropertyAccess(cx, ::JS_GetGlobalForObject(cx, obj), "Window", id, nsIXPCSecurityManager::ACCESS_GET_PROPERTY); @@ -2670,17 +2670,17 @@ nsWindowSH::GlobalScopePolluterGetProper } return JS_TRUE; } // Gets a subframe. static JSBool ChildWindowGetter(JSContext *cx, JSHandleObject obj, JSHandleId id, - JSMutableHandleValue vp) + JS::MutableHandle<JS::Value> vp) { MOZ_ASSERT(JSID_IS_STRING(id)); // Grab the native DOM window. vp.setUndefined(); nsCOMPtr<nsISupports> winSupports = do_QueryInterface(nsDOMClassInfo::XPConnect()->GetNativeOfWrapper(cx, obj)); if (!winSupports) return true; @@ -3153,17 +3153,17 @@ static const IDBConstant sIDBConstants[] { IDBConstant::IDBRequest, "LOADING", "pending" }, { IDBConstant::IDBRequest, "DONE", "done" }, { IDBConstant::IDBTransaction, "READ_ONLY", "readonly" }, { IDBConstant::IDBTransaction, "READ_WRITE", "readwrite" }, { IDBConstant::IDBTransaction, "VERSION_CHANGE", "versionchange" }, }; static JSBool -IDBConstantGetter(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) +IDBConstantGetter(JSContext *cx, JSHandleObject obj, JSHandleId id, JS::MutableHandle<JS::Value> vp) { JSString *idstr = JSID_TO_STRING(id); unsigned index; for (index = 0; index < mozilla::ArrayLength(sIDBConstants); index++) { JSBool match; if (!JS_StringEqualsAscii(cx, idstr, sIDBConstants[index].name, &match)) { return JS_FALSE; } @@ -4290,30 +4290,30 @@ LocationSetterGuts(JSContext *cx, JSObje NS_ENSURE_TRUE(depStr.init(cx, val), NS_ERROR_UNEXPECTED); return location->SetHref(depStr); } template<class Interface> static JSBool LocationSetter(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, - JSMutableHandleValue vp) + JS::MutableHandle<JS::Value> vp) { nsresult rv = LocationSetterGuts<Interface>(cx, obj, vp.address()); if (NS_FAILED(rv)) { xpc::Throw(cx, rv); return JS_FALSE; } return JS_TRUE; } static JSBool LocationSetterUnwrapper(JSContext *cx, JSHandleObject obj_, JSHandleId id, JSBool strict, - JSMutableHandleValue vp) + JS::MutableHandle<JS::Value> vp) { JS::RootedObject obj(cx, obj_); JSObject *wrapped = XPCWrapper::UnsafeUnwrapSecurityWrapper(obj); if (wrapped) { obj = wrapped; } @@ -5696,17 +5696,17 @@ nsHTMLDocumentSH::GetDocumentAllNodeList return JS_FALSE; } return *nodeList != nullptr; } JSBool nsHTMLDocumentSH::DocumentAllGetProperty(JSContext *cx, JSHandleObject obj_, - JSHandleId id, JSMutableHandleValue vp) + JSHandleId id, JS::MutableHandle<JS::Value> vp) { JS::Rooted<JSObject*> obj(cx, obj_); // document.all.item and .namedItem get their value in the // newResolve hook, so nothing to do for those properties here. And // we need to return early to prevent <div id="item"> from shadowing // document.all.item(), etc. if (nsDOMClassInfo::sItem_id == id || nsDOMClassInfo::sNamedItem_id == id) {
--- a/dom/base/nsDOMClassInfo.h +++ b/dom/base/nsDOMClassInfo.h @@ -367,17 +367,17 @@ public: JSObject *obj) MOZ_OVERRIDE; NS_IMETHOD OuterObject(nsIXPConnectWrappedNative *wrapper, JSContext * cx, JSObject * obj, JSObject * *_retval) MOZ_OVERRIDE; static JSBool GlobalScopePolluterNewResolve(JSContext *cx, JSHandleObject obj, JSHandleId id, unsigned flags, JS::MutableHandle<JSObject*> objp); static JSBool GlobalScopePolluterGetProperty(JSContext *cx, JSHandleObject obj, - JSHandleId id, JSMutableHandleValue vp); + JSHandleId id, JS::MutableHandle<JS::Value> vp); static JSBool InvalidateGlobalScopePolluter(JSContext *cx, JS::Handle<JSObject*> obj); static nsresult InstallGlobalScopePolluter(JSContext *cx, JS::Handle<JSObject*> obj); static nsIClassInfo *doCreate(nsDOMClassInfoData* aData) { return new nsWindowSH(aData); } @@ -597,17 +597,17 @@ extern JSClass sHTMLDocumentAllClass; class nsHTMLDocumentSH { protected: static JSBool GetDocumentAllNodeList(JSContext *cx, JS::Handle<JSObject*> obj, nsDocument *doc, nsContentList **nodeList); public: static JSBool DocumentAllGetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, - JSMutableHandleValue vp); + JS::MutableHandle<JS::Value> vp); static JSBool DocumentAllNewResolve(JSContext *cx, JSHandleObject obj, JSHandleId id, unsigned flags, JS::MutableHandle<JSObject*> objp); static void ReleaseDocument(JSFreeOp *fop, JSObject *obj); static JSBool CallToGetPropMapper(JSContext *cx, unsigned argc, jsval *vp); }; // HTMLFormElement helper
--- a/dom/bindings/BindingUtils.cpp +++ b/dom/bindings/BindingUtils.cpp @@ -1750,17 +1750,17 @@ InterfaceHasInstance(JSContext* cx, JS:: } } *bp = false; return true; } JSBool -InterfaceHasInstance(JSContext* cx, JSHandleObject obj, JSMutableHandleValue vp, +InterfaceHasInstance(JSContext* cx, JSHandleObject obj, JS::MutableHandle<JS::Value> vp, JSBool* bp) { if (!vp.isObject()) { *bp = false; return true; } JS::Rooted<JSObject*> instanceObject(cx, &vp.toObject());
--- a/dom/bindings/BindingUtils.h +++ b/dom/bindings/BindingUtils.h @@ -2024,17 +2024,17 @@ ReparentWrapper(JSContext* aCx, JS::Hand * * instance should not be a security wrapper. */ JSBool InterfaceHasInstance(JSContext* cx, JS::Handle<JSObject*> obj, JS::Handle<JSObject*> instance, JSBool* bp); JSBool -InterfaceHasInstance(JSContext* cx, JSHandleObject obj, JSMutableHandleValue vp, +InterfaceHasInstance(JSContext* cx, JSHandleObject obj, JS::MutableHandle<JS::Value> vp, JSBool* bp); // Helper for lenient getters/setters to report to console. If this // returns false, we couldn't even get a global. bool ReportLenientThisUnwrappingFailure(JSContext* cx, JS::Handle<JSObject*> obj); inline JSObject*
--- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -926,17 +926,17 @@ class CGAbstractClassHook(CGAbstractStat assert(False) class CGAddPropertyHook(CGAbstractClassHook): """ A hook for addProperty, used to preserve our wrapper from GC. """ def __init__(self, descriptor): args = [Argument('JSContext*', 'cx'), Argument('JSHandleObject', 'obj'), - Argument('JSHandleId', 'id'), Argument('JSMutableHandleValue', 'vp')] + Argument('JSHandleId', 'id'), Argument('JS::MutableHandle<JS::Value>', 'vp')] CGAbstractClassHook.__init__(self, descriptor, ADDPROPERTY_HOOK_NAME, 'JSBool', args) def generate_code(self): assert not self.descriptor.workers and self.descriptor.wrapperCache if self.descriptor.nativeOwnership == 'nsisupports': preserveArgs = "reinterpret_cast<nsISupports*>(self), self" else: @@ -1183,17 +1183,17 @@ class CGNamedConstructors(CGThing): namedConstructors = CGWrapper(CGIndenter(namedConstructors), pre="static const NamedConstructor namedConstructors[] = {\n", post="\n};\n") return nativePropertyHooks + namedConstructors.define() class CGClassHasInstanceHook(CGAbstractStaticMethod): def __init__(self, descriptor): args = [Argument('JSContext*', 'cx'), Argument('JSHandleObject', 'obj'), - Argument('JSMutableHandleValue', 'vp'), Argument('JSBool*', 'bp')] + Argument('JS::MutableHandle<JS::Value>', 'vp'), Argument('JSBool*', 'bp')] CGAbstractStaticMethod.__init__(self, descriptor, HASINSTANCE_HOOK_NAME, 'JSBool', args) def define(self): if not NeedsGeneratedHasInstance(self.descriptor): return "" return CGAbstractStaticMethod.define(self)
--- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -104,38 +104,38 @@ NPClass nsJSObjWrapper::sJSObjWrapperNPC nsJSObjWrapper::NP_GetProperty, nsJSObjWrapper::NP_SetProperty, nsJSObjWrapper::NP_RemoveProperty, nsJSObjWrapper::NP_Enumerate, nsJSObjWrapper::NP_Construct }; static JSBool -NPObjWrapper_AddProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp); +NPObjWrapper_AddProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JS::MutableHandle<JS::Value> vp); static JSBool NPObjWrapper_DelProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool *succeeded); static JSBool NPObjWrapper_SetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, - JSMutableHandleValue vp); + JS::MutableHandle<JS::Value> vp); static JSBool -NPObjWrapper_GetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp); +NPObjWrapper_GetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JS::MutableHandle<JS::Value> vp); static JSBool NPObjWrapper_newEnumerate(JSContext *cx, JSHandleObject obj, JSIterateOp enum_op, JS::Value *statep, jsid *idp); static JSBool NPObjWrapper_NewResolve(JSContext *cx, JSHandleObject obj, JSHandleId id, unsigned flags, JS::MutableHandle<JSObject*> objp); static JSBool -NPObjWrapper_Convert(JSContext *cx, JSHandleObject obj, JSType type, JSMutableHandleValue vp); +NPObjWrapper_Convert(JSContext *cx, JSHandleObject obj, JSType type, JS::MutableHandle<JS::Value> vp); static void NPObjWrapper_Finalize(JSFreeOp *fop, JSObject *obj); static JSBool NPObjWrapper_Call(JSContext *cx, unsigned argc, JS::Value *vp); static JSBool @@ -166,17 +166,17 @@ JSClass sNPObjectJSWrapperClass = typedef struct NPObjectMemberPrivate { JSObject *npobjWrapper; JS::Value fieldValue; NPIdentifier methodName; NPP npp; } NPObjectMemberPrivate; static JSBool -NPObjectMember_Convert(JSContext *cx, JSHandleObject obj, JSType type, JSMutableHandleValue vp); +NPObjectMember_Convert(JSContext *cx, JSHandleObject obj, JSType type, JS::MutableHandle<JS::Value> vp); static void NPObjectMember_Finalize(JSFreeOp *fop, JSObject *obj); static JSBool NPObjectMember_Call(JSContext *cx, unsigned argc, JS::Value *vp); static void @@ -1103,17 +1103,17 @@ GetNPObject(JSContext *cx, JSObject *obj return (NPObject *)::JS_GetPrivate(obj); } // Does not actually add a property because this is always followed by a // SetProperty call. static JSBool -NPObjWrapper_AddProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) +NPObjWrapper_AddProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JS::MutableHandle<JS::Value> vp) { NPObject *npobj = GetNPObject(cx, obj); if (!npobj || !npobj->_class || !npobj->_class->hasProperty || !npobj->_class->hasMethod) { ThrowJSException(cx, "Bad NPObject as private data!"); return JS_FALSE; @@ -1178,17 +1178,17 @@ NPObjWrapper_DelProperty(JSContext *cx, if (!npobj->_class->removeProperty(npobj, identifier)) *succeeded = false; return ReportExceptionIfPending(cx); } static JSBool NPObjWrapper_SetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSBool strict, - JSMutableHandleValue vp) + JS::MutableHandle<JS::Value> vp) { NPObject *npobj = GetNPObject(cx, obj); if (!npobj || !npobj->_class || !npobj->_class->hasProperty || !npobj->_class->setProperty) { ThrowJSException(cx, "Bad NPObject as private data!"); return JS_FALSE; @@ -1237,17 +1237,17 @@ NPObjWrapper_SetProperty(JSContext *cx, return JS_FALSE; } return JS_TRUE; } static JSBool -NPObjWrapper_GetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JSMutableHandleValue vp) +NPObjWrapper_GetProperty(JSContext *cx, JSHandleObject obj, JSHandleId id, JS::MutableHandle<JS::Value> vp) { NPObject *npobj = GetNPObject(cx, obj); if (!npobj || !npobj->_class || !npobj->_class->hasProperty || !npobj->_class->hasMethod || !npobj->_class->getProperty) { ThrowJSException(cx, "Bad NPObject as private data!"); return JS_FALSE; @@ -1601,17 +1601,17 @@ NPObjWrapper_NewResolve(JSContext *cx, J return fnc != nullptr; } // no property or method return JS_TRUE; } static JSBool -NPObjWrapper_Convert(JSContext *cx, JSHandleObject obj, JSType hint, JSMutableHandleValue vp) +NPObjWrapper_Convert(JSContext *cx, JSHandleObject obj, JSType hint, JS::MutableHandle<JS::Value> vp) { JS_ASSERT(hint == JSTYPE_NUMBER || hint == JSTYPE_STRING || hint == JSTYPE_VOID); // Plugins do not simply use JS_ConvertStub, and the default [[DefaultValue]] // behavior, because that behavior involves calling toString or valueOf on // objects which weren't designed to accommodate this. Usually this wouldn't // be a problem, because the absence of either property, or the presence of // either property with a value that isn't callable, will cause that property @@ -2021,17 +2021,17 @@ CreateNPObjectMember(NPP npp, JSContext memberPrivate->npp = npp; ::JS_RemoveValueRoot(cx, vp); return JS_TRUE; } static JSBool -NPObjectMember_Convert(JSContext *cx, JSHandleObject obj, JSType type, JSMutableHandleValue vp) +NPObjectMember_Convert(JSContext *cx, JSHandleObject obj, JSType type, JS::MutableHandle<JS::Value> vp) { NPObjectMemberPrivate *memberPrivate = (NPObjectMemberPrivate *)::JS_GetInstancePrivate(cx, obj, &sNPObjectMemberClass, nullptr); if (!memberPrivate) { NS_ERROR("no Ambiguous Member Private data!"); return JS_FALSE;
--- a/dom/workers/Events.cpp +++ b/dom/workers/Events.cpp @@ -215,33 +215,33 @@ private: static void Finalize(JSFreeOp* aFop, JSObject* aObj) { JS_ASSERT(IsThisClass(JS_GetClass(aObj))); delete GetJSPrivateSafeish<Event>(aObj); } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); int32_t slot = JSID_TO_INT(aIdval); const char* name = sProperties[slot - SLOT_FIRST].name; if (!GetInstancePrivate(aCx, aObj, name)) { return false; } aVp.set(JS_GetReservedSlot(aObj, slot)); return true; } static JSBool - GetConstant(JSContext* aCx, JSHandleObject aObj, JSHandleId idval, JSMutableHandleValue aVp) + GetConstant(JSContext* aCx, JSHandleObject aObj, JSHandleId idval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(idval)); JS_ASSERT(JSID_TO_INT(idval) >= CAPTURING_PHASE && JSID_TO_INT(idval) <= BUBBLING_PHASE); aVp.set(INT_TO_JSVAL(JSID_TO_INT(idval))); return true; } @@ -500,17 +500,17 @@ private: Finalize(JSFreeOp* aFop, JSObject* aObj) { JS_ASSERT(IsThisClass(JS_GetClass(aObj))); MessageEvent* priv = GetJSPrivateSafeish<MessageEvent>(aObj); delete priv; } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); int32_t slot = JSID_TO_INT(aIdval); JS_ASSERT(slot >= SLOT_data && slot < SLOT_COUNT); const char* name = sProperties[slot - SLOT_FIRST].name; @@ -707,17 +707,17 @@ private: static void Finalize(JSFreeOp* aFop, JSObject* aObj) { JS_ASSERT(IsThisClass(JS_GetClass(aObj))); delete GetJSPrivateSafeish<ErrorEvent>(aObj); } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); int32_t slot = JSID_TO_INT(aIdval); JS_ASSERT(slot >= SLOT_message && slot < SLOT_COUNT); const char* name = sProperties[slot - SLOT_FIRST].name; @@ -886,17 +886,17 @@ private: static void Finalize(JSFreeOp* aFop, JSObject* aObj) { JS_ASSERT(JS_GetClass(aObj) == &sClass); delete GetJSPrivateSafeish<ProgressEvent>(aObj); } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); int32_t slot = JSID_TO_INT(aIdval); JS_ASSERT(slot >= SLOT_lengthComputable && slot < SLOT_COUNT); const char* name = sProperties[slot - SLOT_FIRST].name;
--- a/dom/workers/Exceptions.cpp +++ b/dom/workers/Exceptions.cpp @@ -121,17 +121,17 @@ private: return false; } JS_SET_RVAL(aCx, aVp, STRING_TO_JSVAL(out)); return true; } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); int32_t slot = JSID_TO_INT(aIdval); JSClass* classPtr = JS_GetClass(aObj); if (classPtr != &sClass || !GetJSPrivateSafeish<DOMException>(aObj)) { @@ -141,17 +141,17 @@ private: return false; } aVp.set(JS_GetReservedSlot(aObj, slot)); return true; } static JSBool - GetConstant(JSContext* aCx, JSHandleObject aObj, JSHandleId idval, JSMutableHandleValue aVp) + GetConstant(JSContext* aCx, JSHandleObject aObj, JSHandleId idval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(idval)); aVp.set(INT_TO_JSVAL(JSID_TO_INT(idval))); return true; } }; JSClass DOMException::sClass = {
--- a/dom/workers/File.cpp +++ b/dom/workers/File.cpp @@ -108,17 +108,17 @@ private: { JS_ASSERT(JS_GetClass(aObj) == &sClass); nsIDOMBlob* blob = GetPrivate(aObj); NS_IF_RELEASE(blob); } static JSBool - GetSize(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetSize(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { nsIDOMBlob* blob = GetInstancePrivate(aCx, aObj, "size"); if (!blob) { return false; } uint64_t size; if (NS_FAILED(blob->GetSize(&size))) { @@ -127,17 +127,17 @@ private: } aVp.set(JS_NumberValue(double(size))); return true; } static JSBool - GetType(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetType(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { nsIDOMBlob* blob = GetInstancePrivate(aCx, aObj, "type"); if (!blob) { return false; } nsString type; if (NS_FAILED(blob->GetType(type))) { @@ -297,17 +297,17 @@ private: { JS_ASSERT(JS_GetClass(aObj) == &sClass); nsIDOMFile* file = GetPrivate(aObj); NS_IF_RELEASE(file); } static JSBool - GetMozFullPath(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetMozFullPath(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { nsIDOMFile* file = GetInstancePrivate(aCx, aObj, "mozFullPath"); if (!file) { return false; } nsString fullPath; @@ -323,17 +323,17 @@ private: return false; } aVp.set(STRING_TO_JSVAL(jsFullPath)); return true; } static JSBool - GetName(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetName(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { nsIDOMFile* file = GetInstancePrivate(aCx, aObj, "name"); if (!file) { return false; } nsString name; if (NS_FAILED(file->GetName(name))) { @@ -345,17 +345,17 @@ private: return false; } aVp.set(STRING_TO_JSVAL(jsName)); return true; } static JSBool - GetLastModifiedDate(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetLastModifiedDate(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { nsIDOMFile* file = GetInstancePrivate(aCx, aObj, "lastModifiedDate"); if (!file) { return false; } JS::Rooted<JS::Value> value(aCx); if (NS_FAILED(file->GetLastModifiedDate(aCx, value.address()))) {
--- a/dom/workers/ImageData.cpp +++ b/dom/workers/ImageData.cpp @@ -110,17 +110,17 @@ private: static void Finalize(JSFreeOp* aFop, JSObject* aObj) { MOZ_ASSERT(JS_GetClass(aObj) == &sClass); delete static_cast<ImageData*>(JS_GetPrivate(aObj)); } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JSClass* classPtr = JS_GetClass(aObj); if (classPtr != &sClass) { JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_INCOMPATIBLE_PROTO, sClass.name, "GetProperty", classPtr->name); return false; }
--- a/dom/workers/Location.cpp +++ b/dom/workers/Location.cpp @@ -124,17 +124,17 @@ private: jsval href = JS_GetReservedSlot(obj, SLOT_href); JS_SET_RVAL(aCx, aVp, href); return true; } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JSClass* classPtr = JS_GetClass(aObj); if (classPtr != &sClass) { JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_INCOMPATIBLE_PROTO, sClass.name, "GetProperty", classPtr->name); return false; }
--- a/dom/workers/Navigator.cpp +++ b/dom/workers/Navigator.cpp @@ -112,17 +112,17 @@ private: static void Finalize(JSFreeOp* aFop, JSObject* aObj) { JS_ASSERT(JS_GetClass(aObj) == &sClass); delete static_cast<Navigator*>(JS_GetPrivate(aObj)); } static JSBool - GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetProperty(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JSClass* classPtr = JS_GetClass(aObj); if (classPtr != &sClass) { JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_INCOMPATIBLE_PROTO, sClass.name, "GetProperty", classPtr->name); return false; }
--- a/dom/workers/Worker.cpp +++ b/dom/workers/Worker.cpp @@ -170,17 +170,17 @@ protected: private: // No instance of this class should ever be created so these are explicitly // left without an implementation to prevent linking in case someone tries to // make one. Worker(); ~Worker(); static JSBool - GetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); JS_ASSERT(JSID_TO_INT(aIdval) >= 0 && JSID_TO_INT(aIdval) < STRING_COUNT); const char* name = sEventStrings[JSID_TO_INT(aIdval)]; WorkerPrivate* worker = GetInstancePrivate(aCx, aObj, name); if (!worker) { return !JS_IsExceptionPending(aCx); @@ -195,17 +195,17 @@ private: } aVp.set(listener ? OBJECT_TO_JSVAL(listener) : JSVAL_NULL); return true; } static JSBool SetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSBool aStrict, - JSMutableHandleValue aVp) + JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); JS_ASSERT(JSID_TO_INT(aIdval) >= 0 && JSID_TO_INT(aIdval) < STRING_COUNT); const char* name = sEventStrings[JSID_TO_INT(aIdval)]; WorkerPrivate* worker = GetInstancePrivate(aCx, aObj, name); if (!worker) { return !JS_IsExceptionPending(aCx);
--- a/dom/workers/WorkerScope.cpp +++ b/dom/workers/WorkerScope.cpp @@ -137,17 +137,17 @@ protected: virtual void _finalize(JSFreeOp* aFop) MOZ_OVERRIDE { EventTarget::_finalize(aFop); } private: static JSBool - GetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); JS_ASSERT(JSID_TO_INT(aIdval) >= 0 && JSID_TO_INT(aIdval) < STRING_COUNT); const char* name = sEventStrings[JSID_TO_INT(aIdval)]; WorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, name); if (!scope) { return false; @@ -164,17 +164,17 @@ private: } aVp.set(listener ? OBJECT_TO_JSVAL(listener) : JSVAL_NULL); return true; } static JSBool SetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSBool aStrict, - JSMutableHandleValue aVp) + JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); JS_ASSERT(JSID_TO_INT(aIdval) >= 0 && JSID_TO_INT(aIdval) < STRING_COUNT); const char* name = sEventStrings[JSID_TO_INT(aIdval)]; WorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, name); if (!scope) { return false; @@ -204,28 +204,28 @@ private: Construct(JSContext* aCx, unsigned aArgc, jsval* aVp) { JS_ReportErrorNumber(aCx, js_GetErrorMessage, NULL, JSMSG_WRONG_CONSTRUCTOR, sClass.name); return false; } static JSBool - GetSelf(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetSelf(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { if (!GetInstancePrivate(aCx, aObj, "self")) { return false; } aVp.set(OBJECT_TO_JSVAL(aObj)); return true; } static JSBool - GetLocation(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetLocation(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { WorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, sProperties[SLOT_location].name); if (!scope) { return false; } if (JSVAL_IS_VOID(scope->mSlots[SLOT_location])) { @@ -304,17 +304,17 @@ private: !JS_CallFunctionName(aCx, event, "preventDefault", 0, NULL, rval.address())) { return false; } return true; } static JSBool - GetOnErrorListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetOnErrorListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { const char* name = sEventStrings[STRING_onerror]; WorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, name); if (!scope) { return false; } ErrorResult rv; @@ -336,17 +336,17 @@ private: JS_ASSERT(!JSVAL_IS_PRIMITIVE(aVp)); return true; } static JSBool SetOnErrorListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, - JSBool aStrict, JSMutableHandleValue aVp) + JSBool aStrict, JS::MutableHandle<JS::Value> aVp) { const char* name = sEventStrings[STRING_onerror]; WorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, name); if (!scope) { return false; } if (JSVAL_IS_PRIMITIVE(aVp)) { @@ -378,17 +378,17 @@ private: JS_ReportError(aCx, "Failed to set event listener!"); return false; } return true; } static JSBool - GetNavigator(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetNavigator(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { WorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, sProperties[SLOT_navigator].name); if (!scope) { return false; } if (JSVAL_IS_VOID(scope->mSlots[SLOT_navigator])) { @@ -727,17 +727,17 @@ protected: MOZ_COUNT_DTOR(mozilla::dom::workers::DedicatedWorkerGlobalScope); } private: using EventTarget::GetEventListener; using EventTarget::SetEventListener; static JSBool - GetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSMutableHandleValue aVp) + GetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); JS_ASSERT(JSID_TO_INT(aIdval) >= 0 && JSID_TO_INT(aIdval) < STRING_COUNT); const char* name = sEventStrings[JSID_TO_INT(aIdval)]; DedicatedWorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, name); if (!scope) { return false; @@ -754,17 +754,17 @@ private: } aVp.set(listener ? OBJECT_TO_JSVAL(listener) : JSVAL_NULL); return true; } static JSBool SetEventListener(JSContext* aCx, JSHandleObject aObj, JSHandleId aIdval, JSBool aStrict, - JSMutableHandleValue aVp) + JS::MutableHandle<JS::Value> aVp) { JS_ASSERT(JSID_IS_INT(aIdval)); JS_ASSERT(JSID_TO_INT(aIdval) >= 0 && JSID_TO_INT(aIdval) < STRING_COUNT); const char* name = sEventStrings[JSID_TO_INT(aIdval)]; DedicatedWorkerGlobalScope* scope = GetInstancePrivate(aCx, aObj, name); if (!scope) { return false;