From 684b18d38885db5207c767ace82e7d42ab708b81 Mon Sep 17 00:00:00 2001 From: Luke Wagner Date: Sun, 4 Jul 2010 12:35:21 -0700 Subject: [PATCH] Browser build fixes (stuff still broken) --- dom/base/nsDOMClassInfo.cpp | 5 +- dom/base/nsDOMClassInfo.h | 1 + dom/indexedDB/IDBCursor.cpp | 20 +- dom/indexedDB/IDBEvents.cpp | 8 +- dom/indexedDB/IDBObjectStore.cpp | 40 +- js/src/jscntxt.h | 7 + js/src/jsinterp.h | 3 +- js/src/jsobj.h | 4 + .../xpconnect/src/XPCCrossOriginWrapper.cpp | 2 +- js/src/xpconnect/src/XPCNativeWrapper.cpp | 2 +- js/src/xpconnect/src/dom_quickstubs.qsconf | 854 +++++++++--------- js/src/xpconnect/src/nsXPConnect.cpp | 2 +- js/src/xpconnect/src/qsgen.py | 8 +- js/src/xpconnect/src/wrappers/AccessCheck.cpp | 9 +- .../xpconnect/src/wrappers/ChromeWrapper.cpp | 12 +- js/src/xpconnect/src/wrappers/ChromeWrapper.h | 8 +- js/src/xpconnect/src/xpccomponents.cpp | 4 +- js/src/xpconnect/src/xpcconvert.cpp | 2 +- js/src/xpconnect/src/xpcprivate.h | 6 +- js/src/xpconnect/src/xpcwrappednative.cpp | 1 - .../xpconnect/src/xpcwrappednativejsops.cpp | 2 +- 21 files changed, 510 insertions(+), 490 deletions(-) diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index d27a42ccab0d..94550b9af45d 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -1547,7 +1547,8 @@ jsid nsDOMClassInfo::sOnpopstate_id = JSID_VOID; jsid nsDOMClassInfo::sOnbeforeunload_id = JSID_VOID; jsid nsDOMClassInfo::sOnunload_id = JSID_VOID; jsid nsDOMClassInfo::sOnhashchange_id = JSID_VOID; -jsval nsDOMClassInfo::sOnreadystatechange_id = JSID_VOID; +jsid nsDOMClassInfo::sOnreadystatechange_id = JSID_VOID; +jsid nsDOMClassInfo::sOnpageshow_id = JSID_VOID; jsid nsDOMClassInfo::sOnpagehide_id = JSID_VOID; jsid nsDOMClassInfo::sOnabort_id = JSID_VOID; jsid nsDOMClassInfo::sOnerror_id = JSID_VOID; @@ -1748,6 +1749,7 @@ nsDOMClassInfo::DefineStaticJSVals(JSContext *cx) SET_JSID_TO_STRING(sOnunload_id, cx, "onunload"); SET_JSID_TO_STRING(sOnhashchange_id, cx, "onhashchange"); SET_JSID_TO_STRING(sOnreadystatechange_id, cx, "onreadystatechange"); + SET_JSID_TO_STRING(sOnpageshow_id, cx, "onpageshow"); SET_JSID_TO_STRING(sOnpagehide_id, cx, "onpagehide"); SET_JSID_TO_STRING(sOnabort_id, cx, "onabort"); SET_JSID_TO_STRING(sOnerror_id, cx, "onerror"); @@ -4761,6 +4763,7 @@ nsDOMClassInfo::ShutDown() sOnunload_id = JSID_VOID; sOnhashchange_id = JSID_VOID; sOnreadystatechange_id = JSID_VOID; + sOnpageshow_id = JSID_VOID; sOnpagehide_id = JSID_VOID; sOnabort_id = JSID_VOID; sOnerror_id = JSID_VOID; diff --git a/dom/base/nsDOMClassInfo.h b/dom/base/nsDOMClassInfo.h index acfc8e8537d7..d32183e9464e 100644 --- a/dom/base/nsDOMClassInfo.h +++ b/dom/base/nsDOMClassInfo.h @@ -322,6 +322,7 @@ protected: static jsid sOnunload_id; static jsid sOnhashchange_id; static jsid sOnreadystatechange_id; + static jsid sOnpageshow_id; static jsid sOnpagehide_id; static jsid sOnabort_id; static jsid sOnerror_id; diff --git a/dom/indexedDB/IDBCursor.cpp b/dom/indexedDB/IDBCursor.cpp index dcb71a8da33f..e68febbbc788 100644 --- a/dom/indexedDB/IDBCursor.cpp +++ b/dom/indexedDB/IDBCursor.cpp @@ -436,7 +436,7 @@ IDBCursor::Update(jsval aValue, js::AutoValueRooter clone(aCx); nsresult rv = nsContentUtils::CreateStructuredClone(aCx, aValue, - clone.addr()); + clone.jsval_addr()); if (NS_FAILED(rv)) { return rv; } @@ -449,22 +449,22 @@ IDBCursor::Update(jsval aValue, const size_t keyPathLen = keyPath.Length(); js::AutoValueRooter prop(aCx); - JSBool ok = JS_GetUCProperty(aCx, JSVAL_TO_OBJECT(clone.value()), - keyPathChars, keyPathLen, prop.addr()); + JSBool ok = JS_GetUCProperty(aCx, JSVAL_TO_OBJECT(clone.jsval_value()), + keyPathChars, keyPathLen, prop.jsval_addr()); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); - if (JSVAL_IS_VOID(prop.value())) { - rv = IDBObjectStore::GetJSValFromKey(key, aCx, prop.addr()); + if (JSVAL_IS_VOID(prop.jsval_value())) { + rv = IDBObjectStore::GetJSValFromKey(key, aCx, prop.jsval_addr()); NS_ENSURE_SUCCESS(rv, rv); - ok = JS_DefineUCProperty(aCx, JSVAL_TO_OBJECT(clone.value()), - keyPathChars, keyPathLen, prop.value(), nsnull, + ok = JS_DefineUCProperty(aCx, JSVAL_TO_OBJECT(clone.jsval_value()), + keyPathChars, keyPathLen, prop.jsval_value(), nsnull, nsnull, JSPROP_ENUMERATE); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); } else { Key newKey; - rv = IDBObjectStore::GetKeyFromJSVal(prop.value(), newKey); + rv = IDBObjectStore::GetKeyFromJSVal(prop.jsval_value(), newKey); NS_ENSURE_SUCCESS(rv, rv); if (newKey.IsUnset() || newKey.IsNull() || newKey != key) { @@ -475,13 +475,13 @@ IDBCursor::Update(jsval aValue, nsTArray indexUpdateInfo; rv = IDBObjectStore::GetIndexUpdateInfo(mObjectStore->GetObjectStoreInfo(), - aCx, clone.value(), indexUpdateInfo); + aCx, clone.jsval_value(), indexUpdateInfo); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr json(new nsJSON()); nsString jsonValue; - rv = json->EncodeFromJSVal(clone.addr(), aCx, jsonValue); + rv = json->EncodeFromJSVal(clone.jsval_addr(), aCx, jsonValue); NS_ENSURE_SUCCESS(rv, rv); nsRefPtr request = GenerateWriteRequest(); diff --git a/dom/indexedDB/IDBEvents.cpp b/dom/indexedDB/IDBEvents.cpp index 932fa0ab1fcb..bc9e65681197 100644 --- a/dom/indexedDB/IDBEvents.cpp +++ b/dom/indexedDB/IDBEvents.cpp @@ -473,14 +473,14 @@ GetAllSuccessEvent::GetResult(JSContext* aCx, nsString jsonValue = values[index]; values[index].Truncate(); - nsresult rv = json->DecodeToJSVal(jsonValue, aCx, value.addr()); + nsresult rv = json->DecodeToJSVal(jsonValue, aCx, value.jsval_addr()); if (NS_FAILED(rv)) { mCachedValue = JSVAL_VOID; NS_ERROR("Failed to decode!"); return rv; } - if (!JS_SetElement(aCx, array, index, value.addr())) { + if (!JS_SetElement(aCx, array, index, value.jsval_addr())) { mCachedValue = JSVAL_VOID; NS_ERROR("Failed to set array element!"); return NS_ERROR_FAILURE; @@ -539,14 +539,14 @@ GetAllKeySuccessEvent::GetResult(JSContext* aCx, const Key& key = keys[index]; NS_ASSERTION(!key.IsUnset() && !key.IsNull(), "Bad key!"); - nsresult rv = IDBObjectStore::GetJSValFromKey(key, aCx, value.addr()); + nsresult rv = IDBObjectStore::GetJSValFromKey(key, aCx, value.jsval_addr()); if (NS_FAILED(rv)) { mCachedValue = JSVAL_VOID; NS_WARNING("Failed to get jsval for key!"); return rv; } - if (!JS_SetElement(aCx, array, index, value.addr())) { + if (!JS_SetElement(aCx, array, index, value.jsval_addr())) { mCachedValue = JSVAL_VOID; NS_WARNING("Failed to set array element!"); return NS_ERROR_FAILURE; diff --git a/dom/indexedDB/IDBObjectStore.cpp b/dom/indexedDB/IDBObjectStore.cpp index 88f056ba748d..6161da25f63d 100644 --- a/dom/indexedDB/IDBObjectStore.cpp +++ b/dom/indexedDB/IDBObjectStore.cpp @@ -373,7 +373,7 @@ IDBObjectStore::GetKeyFromJSVal(jsval aKeyVal, aKey = JSVAL_TO_INT(aKeyVal); } else if (JSVAL_IS_DOUBLE(aKeyVal)) { - aKey = *JSVAL_TO_DOUBLE(aKeyVal); + aKey = JSVAL_TO_DOUBLE(aKeyVal); } else { return NS_ERROR_INVALID_ARG; @@ -452,14 +452,14 @@ IDBObjectStore::GetJSONFromArg0(/* jsval arg0, */ JSAutoRequest ar(cx); js::AutoValueRooter clone(cx); - rv = nsContentUtils::CreateStructuredClone(cx, argv[0], clone.addr()); + rv = nsContentUtils::CreateStructuredClone(cx, argv[0], clone.jsval_addr()); if (NS_FAILED(rv)) { return rv; } nsCOMPtr json(new nsJSON()); - rv = json->EncodeFromJSVal(clone.addr(), cx, aJSON); + rv = json->EncodeFromJSVal(clone.jsval_addr(), cx, aJSON); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; @@ -488,16 +488,16 @@ IDBObjectStore::GetKeyPathValueFromJSON(const nsAString& aJSON, js::AutoValueRooter clone(*aCx); nsCOMPtr json(new nsJSON()); - rv = json->DecodeToJSVal(aJSON, *aCx, clone.addr()); + rv = json->DecodeToJSVal(aJSON, *aCx, clone.jsval_addr()); NS_ENSURE_SUCCESS(rv, rv); - if (JSVAL_IS_PRIMITIVE(clone.value())) { + if (JSVAL_IS_PRIMITIVE(clone.jsval_value())) { // This isn't an object, so just leave the key unset. aValue = Key::UNSETKEY; return NS_OK; } - JSObject* obj = JSVAL_TO_OBJECT(clone.value()); + JSObject* obj = JSVAL_TO_OBJECT(clone.jsval_value()); const jschar* keyPathChars = reinterpret_cast(aKeyPath.BeginReading()); @@ -505,10 +505,10 @@ IDBObjectStore::GetKeyPathValueFromJSON(const nsAString& aJSON, js::AutoValueRooter value(*aCx); JSBool ok = JS_GetUCProperty(*aCx, obj, keyPathChars, keyPathLen, - value.addr()); + value.jsval_addr()); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); - rv = GetKeyFromJSVal(value.value(), aValue); + rv = GetKeyFromJSVal(value.jsval_value(), aValue); if (NS_FAILED(rv) || aValue.IsNull()) { // If the object doesn't have a value that we can use for our index then we // leave it unset. @@ -729,7 +729,7 @@ IDBObjectStore::GetAddInfo(JSContext* aCx, js::AutoValueRooter clone(aCx); nsresult rv = nsContentUtils::CreateStructuredClone(aCx, aValue, - clone.addr()); + clone.jsval_addr()); if (NS_FAILED(rv)) { return rv; } @@ -740,11 +740,11 @@ IDBObjectStore::GetAddInfo(JSContext* aCx, } else { // Inline keys live on the object. Make sure it is an object. - if (JSVAL_IS_PRIMITIVE(clone.value())) { + if (JSVAL_IS_PRIMITIVE(clone.jsval_value())) { return NS_ERROR_INVALID_ARG; } - rv = GetKeyFromObject(aCx, JSVAL_TO_OBJECT(clone.value()), mKeyPath, aKey); + rv = GetKeyFromObject(aCx, JSVAL_TO_OBJECT(clone.jsval_value()), mKeyPath, aKey); NS_ENSURE_SUCCESS(rv, rv); // Except if null was passed, in which case we're supposed to generate the @@ -762,11 +762,11 @@ IDBObjectStore::GetAddInfo(JSContext* aCx, ObjectStoreInfo* objectStoreInfo = GetObjectStoreInfo(); NS_ENSURE_TRUE(objectStoreInfo, NS_ERROR_FAILURE); - rv = GetIndexUpdateInfo(objectStoreInfo, aCx, clone.value(), aUpdateInfoArray); + rv = GetIndexUpdateInfo(objectStoreInfo, aCx, clone.jsval_value(), aUpdateInfoArray); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr json(new nsJSON()); - rv = json->EncodeFromJSVal(clone.addr(), aCx, aJSON); + rv = json->EncodeFromJSVal(clone.jsval_addr(), aCx, aJSON); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; @@ -1473,10 +1473,10 @@ AddHelper::ModifyValueForNewKey() js::AutoValueRooter clone(cx); nsCOMPtr json(new nsJSON()); - rv = json->DecodeToJSVal(mValue, cx, clone.addr()); + rv = json->DecodeToJSVal(mValue, cx, clone.jsval_addr()); NS_ENSURE_SUCCESS(rv, rv); - JSObject* obj = JSVAL_TO_OBJECT(clone.value()); + JSObject* obj = JSVAL_TO_OBJECT(clone.jsval_value()); JSBool ok; js::AutoValueRooter key(cx); @@ -1484,18 +1484,18 @@ AddHelper::ModifyValueForNewKey() const size_t keyPathLen = mKeyPath.Length(); #ifdef DEBUG - ok = JS_GetUCProperty(cx, obj, keyPathChars, keyPathLen, key.addr()); - NS_ASSERTION(ok && JSVAL_IS_VOID(key.value()), "Already has a key prop!"); + ok = JS_GetUCProperty(cx, obj, keyPathChars, keyPathLen, key.jsval_addr()); + NS_ASSERTION(ok && JSVAL_IS_VOID(key.jsval_value()), "Already has a key prop!"); #endif - ok = JS_NewNumberValue(cx, mKey.IntValue(), key.addr()); + ok = JS_NewNumberValue(cx, mKey.IntValue(), key.jsval_addr()); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); - ok = JS_DefineUCProperty(cx, obj, keyPathChars, keyPathLen, key.value(), + ok = JS_DefineUCProperty(cx, obj, keyPathChars, keyPathLen, key.jsval_value(), nsnull, nsnull, JSPROP_ENUMERATE); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); - rv = json->EncodeFromJSVal(clone.addr(), cx, mValue); + rv = json->EncodeFromJSVal(clone.jsval_addr(), cx, mValue); NS_ENSURE_SUCCESS(rv, rv); return NS_OK; diff --git a/js/src/jscntxt.h b/js/src/jscntxt.h index 05013a0bb8c9..35819ce34ada 100644 --- a/js/src/jscntxt.h +++ b/js/src/jscntxt.h @@ -2308,6 +2308,13 @@ class AutoValueRooter : private AutoGCRooter JS_GUARD_OBJECT_NOTIFIER_INIT; } + AutoValueRooter(JSContext *cx, jsval v + JS_GUARD_OBJECT_NOTIFIER_PARAM) + : AutoGCRooter(cx, JSVAL), val(js::Valueify(v)) + { + JS_GUARD_OBJECT_NOTIFIER_INIT; + } + /* * If you are looking for Object* overloads, use AutoObjectRooter instead; * rooting Object*s as a js::Value requires discerning whether or not it is diff --git a/js/src/jsinterp.h b/js/src/jsinterp.h index 52f44d72ebdc..90fd2c879c3e 100644 --- a/js/src/jsinterp.h +++ b/js/src/jsinterp.h @@ -137,8 +137,8 @@ struct JSStackFrame * also used in some other cases --- entering 'with' blocks, for * example. */ - JSObject *blockChain; JSObject *scopeChain; + JSObject *blockChain; uint32 flags; /* frame flags -- see below */ JSStackFrame *displaySave; /* previous value of display entry for @@ -213,7 +213,6 @@ static const size_t VALUES_PER_STACK_FRAME = sizeof(JSStackFrame) / sizeof(Value JS_STATIC_ASSERT(offsetof(JSStackFrame, rval) % sizeof(Value) == 0); JS_STATIC_ASSERT(offsetof(JSStackFrame, thisv) % sizeof(Value) == 0); -JS_STATIC_ASSERT(offsetof(JSStackFrame, scopeChain) % sizeof(Value) == 0); } /* namespace js */ diff --git a/js/src/jsobj.h b/js/src/jsobj.h index dfdc1ce5c068..040ace1a6208 100644 --- a/js/src/jsobj.h +++ b/js/src/jsobj.h @@ -278,6 +278,10 @@ struct JSObject { JSObject *proto; /* object's prototype */ js::Value *dslots; /* dynamically allocated slots */ #if JS_BITS_PER_WORD == 32 + // TODO: this is needed to pad out fslots. alternatively, clasp could be + // merged by with flags and the padding removed, but I think the upcoming + // removal of JSScope will change this all anyway so I will leave this + // here for now. uint32 padding; #endif js::Value fslots[JS_INITIAL_NSLOTS]; /* small number of fixed slots */ diff --git a/js/src/xpconnect/src/XPCCrossOriginWrapper.cpp b/js/src/xpconnect/src/XPCCrossOriginWrapper.cpp index a95feacfd339..3ebbfb444832 100644 --- a/js/src/xpconnect/src/XPCCrossOriginWrapper.cpp +++ b/js/src/xpconnect/src/XPCCrossOriginWrapper.cpp @@ -261,7 +261,7 @@ CanAccessWrapper(JSContext *cx, JSObject *outerObj, JSObject *wrappedObj, JSObject *innerParent = wrappedObj->getParent(); if (!innerParent) { innerParent = wrappedObj; - Innerize(cx, &innerParent); + OBJ_TO_INNER_OBJECT(cx, innerParent); if (!innerParent) { return NS_ERROR_FAILURE; } diff --git a/js/src/xpconnect/src/XPCNativeWrapper.cpp b/js/src/xpconnect/src/XPCNativeWrapper.cpp index ea8f011b5b98..67eb6d5030d6 100644 --- a/js/src/xpconnect/src/XPCNativeWrapper.cpp +++ b/js/src/xpconnect/src/XPCNativeWrapper.cpp @@ -591,7 +591,7 @@ XPC_NW_NewResolve(JSContext *cx, JSObject *obj, jsid id, uintN flags, } JSObject *funobj = JS_GetFunctionObject(fun); - funobj->setParent(js::ObjectOrNullTag(obj)); + funobj->setParent(obj); return JS_DefineProperty(cx, obj, "toString", OBJECT_TO_JSVAL(funobj), nsnull, nsnull, 0); diff --git a/js/src/xpconnect/src/dom_quickstubs.qsconf b/js/src/xpconnect/src/dom_quickstubs.qsconf index 8f0a978f3115..c44107c1d699 100644 --- a/js/src/xpconnect/src/dom_quickstubs.qsconf +++ b/js/src/xpconnect/src/dom_quickstubs.qsconf @@ -48,431 +48,431 @@ name = 'DOM' # doesn't crash--it may in fact return a plausible wrong answer. members = [ - # dom/interfaces/base - # - # Note that many implementations of interfaces in this directory - # use GetCurrentNativeCallContext, notably: - # - nsIDOMCrypto.{generateCRMFRequest,signText} - # - nsIDOMLocation.reload - # - nsIDOMNSHistory.go - # - nsIDOMJSPluginArray.refresh - # - nsIDOMWindowInternal.postMessage - # - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog} - # - # (And nsIDOMModalContentWindow.returnValue is an attribute of type - # nsIVariant, which qsgen.py can't handle.) - # - 'nsIDOMWindow.name', - 'nsIDOMWindow.parent', - 'nsIDOMWindow.top', - # Several window properties are magically resolved, including - # location, _content, navigator, document, and window itself. - # These do not need quick stubs. - #'nsIDOMWindow.document', - 'nsIDOMWindow.getSelection', - 'nsIDOMWindow.scrollByLines', - 'nsIDOMJSWindow.dump', - 'nsIDOMScreen.top', - 'nsIDOMScreen.height', - 'nsIDOMScreen.width', - 'nsIDOMScreen.left', - 'nsIDOMClientRect.*', - 'nsIDOMClientRectList.*', - 'nsIDOMPaintRequest.*', - 'nsIDOMPaintRequestList.*', - # nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try. - #'nsIDOMLocation.hostname', - #'nsIDOMLocation.href', - - # dom/interfaces/canvas - # - # nsIDOMCanvasRenderingContext2D and friends - 'nsIDOMCanvasRenderingContext2D.*', - 'nsIDOMTextMetrics.*', - 'nsIDOMCanvasGradient.*', - 'nsIDOMCanvasPattern.*', - - # dom/interfaces/core - 'nsIDOMCharacterData.data', - 'nsIDOMCharacterData.length', - 'nsIDOMDocument.documentElement', - 'nsIDOMDocument.implementation', - 'nsIDOMDocument.getElementsByTagName', - 'nsIDOMDocument.doctype', - 'nsIDOMDocument.getElementsByTagNameNS', - 'nsIDOMDocument.getElementById', - 'nsIDOMDocument.createDocumentFragment', - 'nsIDOMDocument.createElement', - 'nsIDOMDocument.importNode', - 'nsIDOMDocument.createTextNode', - 'nsIDOMElement.removeAttributeNS', - 'nsIDOMElement.removeAttribute', - 'nsIDOMElement.getAttribute', - 'nsIDOMElement.getElementsByTagName', - 'nsIDOMElement.setAttribute', - 'nsIDOMElement.getElementsByTagNameNS', - 'nsIDOMElement.hasAttributeNS', - 'nsIDOMElement.tagName', - 'nsIDOMElement.setAttributeNS', - 'nsIDOMElement.hasAttribute', - 'nsIDOMElement.getAttributeNS', - 'nsIDOMNamedNodeMap.item', - 'nsIDOMNamedNodeMap.length', - 'nsIDOMNode.appendChild', - 'nsIDOMNode.nextSibling', - 'nsIDOMNode.cloneNode', - 'nsIDOMNode.firstChild', - 'nsIDOMNode.prefix', - 'nsIDOMNode.nodeValue', - 'nsIDOMNode.childNodes', - 'nsIDOMNode.normalize', - 'nsIDOMNode.nodeName', - 'nsIDOMNode.namespaceURI', - 'nsIDOMNode.hasChildNodes', - 'nsIDOMNode.previousSibling', - 'nsIDOMNode.nodeType', - 'nsIDOMNode.insertBefore', - 'nsIDOMNode.replaceChild', - 'nsIDOMNode.localName', - 'nsIDOMNode.lastChild', - 'nsIDOMNode.ownerDocument', - 'nsIDOMNode.parentNode', - 'nsIDOMNode.removeChild', - 'nsIDOMNode.hasAttributes', - 'nsIDOMNode.attributes', - 'nsIDOMNodeList.*', - 'nsIDOMNodeSelector.querySelector', - 'nsIDOMNodeSelector.querySelectorAll', - 'nsIDOMText.splitText', - 'nsIDOM3Document.documentURI', - 'nsIDOM3Document.adoptNode', - 'nsIDOM3Document.renameNode', - 'nsIDOM3Node.*', - 'nsIDOMDOMStringList.*', - 'nsIDOMDOMTokenList.*', - 'nsIDOMDOMSettableTokenList.*', - 'nsIDOMNameList.getName', - 'nsIDOMNameList.contains', - 'nsIDOMNameList.containsNS', - 'nsIDOMNameList.length', - 'nsIDOMNameList.getNamespaceURI', - 'nsIDOMNSDocument.getElementsByClassName', - 'nsIDOMNSDocument.title', - 'nsIDOMNSDocument.hasFocus', - # This property is treated specially in nsDOMClassInfo in a way that - # would shadow any quick stub. Also, document.location is a special - # case for security. - #'nsIDOMNSDocument.location', - 'nsIDOMNSDocument.elementFromPoint', - 'nsIDOMNSDocument.activeElement', - 'nsIDOMXULDocument.getBoxObjectFor', - 'nsIDOMXMLDocument.evaluateXPointer', - 'nsIDOMXMLDocument.evaluateFIXptr', - 'nsIDOMNSElement.getClientRects', - 'nsIDOMNSElement.getBoundingClientRect', - 'nsIDOMNSElement.getElementsByClassName', - 'nsIDOMNSElement.scrollWidth', - 'nsIDOMNSElement.clientLeft', - 'nsIDOMNSElement.clientHeight', - 'nsIDOMNSElement.clientWidth', - 'nsIDOMNSElement.clientTop', - 'nsIDOMNSElement.mozMatchesSelector', - - # dom/interfaces/css - 'nsIDOMElementCSSInlineStyle.*', - 'nsIDOMCSS2Properties.*', - 'nsIDOMNSCSS2Properties.*', - 'nsIDOMRect.*', - 'nsIDOMViewCSS.getComputedStyle', - - # dom/interfaces/events - 'nsIDOMEventTarget.dispatchEvent', - 'nsIDOMEventTarget.removeEventListener', - 'nsIDOMNSEventTarget.addEventListener', - 'nsIDOMDocumentEvent.*', - - 'nsIDOMEvent.*', - 'nsIDOMMouseEvent.*', - 'nsIDOMKeyEvent.*', - 'nsIDOMMutationEvent.*', - 'nsIDOMDragEvent.*', - 'nsIDOMScrollAreaEvent.*', - 'nsIDOMNotifyPaintEvent.*', - 'nsIDOMMessageEvent.*', - 'nsIDOMMouseScrollEvent.*', - 'nsIDOMProgressEvent.lengthComputable', - 'nsIDOMProgressEvent.loaded', - 'nsIDOMProgressEvent.total', - #XXX Can't quickstub initProgressEvent because it has long long parameters. - 'nsIDOMNSEvent.originalTarget', - 'nsIDOMNSEvent.getPreventDefault', - 'nsIDOMNSUIEvent.which', - 'nsIDOMNSUIEvent.rangeParent', - 'nsIDOMNSUIEvent.rangeOffset', - 'nsIDOMNSUIEvent.pageX', - 'nsIDOMNSUIEvent.pageY', - 'nsIDOMNSUIEvent.isChar', - - # dom/interfaces/geolocation - None. - - # dom/interfaces/html - 'nsIDOMHTMLAnchorElement.href', - 'nsIDOMHTMLAnchorElement.rel', - 'nsIDOMHTMLAnchorElement.target', - 'nsIDOMHTMLAnchorElement.name', - 'nsIDOMHTMLBaseElement.href', - 'nsIDOMHTMLBaseElement.target', - 'nsIDOMHTMLButtonElement.name', - 'nsIDOMHTMLButtonElement.form', - 'nsIDOMHTMLButtonElement.value', - 'nsIDOMHTMLButtonElement.disabled', - 'nsIDOMHTMLCollection.item', - # This is shadowed by nsIDOMHTMLOptionsCollection.length, - # but it is also present in other objects where it isn't shadowed. - # Quick stubs handle the shadowing the same as XPConnect. - 'nsIDOMHTMLCollection.length', - 'nsIDOMHTMLDocument.body', - 'nsIDOMHTMLDocument.getElementsByName', - 'nsIDOMHTMLDocument.anchors', - 'nsIDOMHTMLDocument.links', - 'nsIDOMHTMLDocument.title', - 'nsIDOMHTMLDocument.URL', - 'nsIDOMHTMLDocument.referrer', - 'nsIDOMHTMLDocument.forms', - 'nsIDOMHTMLDocument.cookie', - 'nsIDOMHTMLDocument.images', - 'nsIDOMHTMLDocument.write', - 'nsIDOMHTMLDocument.writeln', - 'nsIDOMHTMLElement.className', - 'nsIDOMHTMLElement.id', - 'nsIDOMHTMLElement.title', - 'nsIDOMHTMLFormElement.elements', - 'nsIDOMHTMLFormElement.name', - 'nsIDOMHTMLFormElement.submit', - 'nsIDOMHTMLFormElement.length', - 'nsIDOMHTMLFormElement.target', - 'nsIDOMHTMLFormElement.action', - 'nsIDOMHTMLFrameElement.src', - 'nsIDOMHTMLFrameElement.contentDocument', - 'nsIDOMHTMLFrameElement.name', - 'nsIDOMHTMLFrameSetElement.rows', - 'nsIDOMHTMLFrameSetElement.cols', - 'nsIDOMHTMLIFrameElement.src', - 'nsIDOMHTMLIFrameElement.contentDocument', - 'nsIDOMHTMLImageElement.src', - 'nsIDOMHTMLImageElement.name', - 'nsIDOMHTMLImageElement.height', - 'nsIDOMHTMLImageElement.width', - 'nsIDOMHTMLInputElement.defaultChecked', - 'nsIDOMHTMLInputElement.disabled', - 'nsIDOMHTMLInputElement.select', - 'nsIDOMHTMLInputElement.checked', - 'nsIDOMHTMLInputElement.type', - 'nsIDOMHTMLInputElement.form', - 'nsIDOMHTMLInputElement.src', - 'nsIDOMHTMLInputElement.name', - 'nsIDOMHTMLInputElement.value', - 'nsIDOMHTMLLinkElement.disabled', - 'nsIDOMHTMLOptionElement.index', - 'nsIDOMHTMLOptionElement.selected', - 'nsIDOMHTMLOptionElement.form', - # Readonly, shadowed by nsIDOMNSHTMLOptionElement.text (below). - #'nsIDOMHTMLOptionElement.text', - 'nsIDOMHTMLOptionElement.defaultSelected', - 'nsIDOMHTMLOptionElement.value', - 'nsIDOMHTMLOptionElement.label', - 'nsIDOMHTMLOptionElement.disabled', - 'nsIDOMHTMLOptionsCollection.item', - 'nsIDOMHTMLOptionsCollection.length', - 'nsIDOMHTMLSelectElement.name', - 'nsIDOMHTMLSelectElement.form', - 'nsIDOMHTMLSelectElement.add', - 'nsIDOMHTMLSelectElement.value', - 'nsIDOMHTMLSelectElement.disabled', - 'nsIDOMHTMLSelectElement.length', - 'nsIDOMHTMLSelectElement.remove', - 'nsIDOMHTMLSelectElement.selectedIndex', - 'nsIDOMHTMLSelectElement.type', - 'nsIDOMHTMLSelectElement.options', - 'nsIDOMHTMLSelectElement.size', - 'nsIDOMHTMLStyleElement.disabled', - 'nsIDOMHTMLTableCellElement.colSpan', - 'nsIDOMHTMLTableCellElement.headers', - 'nsIDOMHTMLTableCellElement.cellIndex', - 'nsIDOMHTMLTableCellElement.rowSpan', - 'nsIDOMHTMLTableCellElement.abbr', - 'nsIDOMHTMLTableCellElement.scope', - 'nsIDOMHTMLTableCellElement.noWrap', - 'nsIDOMHTMLTableCellElement.width', - 'nsIDOMHTMLTableColElement.span', - 'nsIDOMHTMLTableColElement.width', - 'nsIDOMHTMLTableElement.rows', - 'nsIDOMHTMLTableElement.deleteRow', - 'nsIDOMHTMLTableElement.summary', - 'nsIDOMHTMLTableElement.insertRow', - 'nsIDOMHTMLTableRowElement.sectionRowIndex', - 'nsIDOMHTMLTableRowElement.rowIndex', - 'nsIDOMHTMLTableRowElement.cells', - 'nsIDOMHTMLTableRowElement.deleteCell', - 'nsIDOMHTMLTableRowElement.insertCell', - 'nsIDOMHTMLTableSectionElement.rows', - 'nsIDOMHTMLTableSectionElement.insertRow', - 'nsIDOMHTMLTableSectionElement.deleteRow', - 'nsIDOMHTMLTextAreaElement.rows', - 'nsIDOMHTMLTextAreaElement.name', - 'nsIDOMHTMLTextAreaElement.form', - 'nsIDOMHTMLTextAreaElement.defaultValue', - 'nsIDOMHTMLTextAreaElement.cols', - 'nsIDOMHTMLTextAreaElement.value', - 'nsIDOMHTMLTextAreaElement.type', - 'nsIDOMHTMLTextAreaElement.select', - 'nsIDOMHTMLTitleElement.text', - 'nsIDOMHTMLCanvasElement.width', - 'nsIDOMHTMLCanvasElement.height', - 'nsIDOMHTMLCanvasElement.getContext', - 'nsIDOMHTMLCanvasElement.toDataURL', - 'nsIDOMNSHTMLAnchorElement.text', - 'nsIDOMNSHTMLAnchorElement.search', - 'nsIDOMNSHTMLAnchorElement.hash', - 'nsIDOMNSHTMLDocument.width', - 'nsIDOMNSHTMLDocument.height', - 'nsIDOMNSHTMLDocument.domain', - 'nsIDOMNSHTMLDocument.getSelection', - 'nsIDOMNSHTMLDocument.designMode', - 'nsIDOMNSHTMLElement.contentEditable', - 'nsIDOMNSHTMLElement.isContentEditable', - 'nsIDOMNSHTMLElement.offsetParent', - 'nsIDOMNSHTMLElement.innerHTML', - 'nsIDOMNSHTMLElement.offsetLeft', - 'nsIDOMNSHTMLElement.offsetTop', - 'nsIDOMNSHTMLElement.offsetHeight', - 'nsIDOMNSHTMLElement.offsetWidth', - 'nsIDOMNSHTMLElement.scrollIntoView', - 'nsIDOMNSHTMLFrameElement.contentWindow', - 'nsIDOMNSHTMLImageElement.complete', - 'nsIDOMNSHTMLInputElement.files', - 'nsIDOMNSHTMLInputElement.textLength', - 'nsIDOMNSHTMLInputElement.selectionStart', - 'nsIDOMNSHTMLInputElement.selectionEnd', - 'nsIDOMNSHTMLInputElement.setSelectionRange', - 'nsIDOMNSHTMLOptionCollection.selectedIndex', - 'nsIDOMNSHTMLOptionCollection.add', - 'nsIDOMNSHTMLOptionElement.text', - 'nsIDOMNSHTMLSelectElement.item', - 'nsIDOMNSHTMLTextAreaElement.setSelectionRange', - 'nsIDOMNSHTMLTextAreaElement.selectionStart', - 'nsIDOMNSHTMLTextAreaElement.selectionEnd', - 'nsIDOMNSHTMLTextAreaElement.textLength', - 'nsIDOMNSHTMLTextAreaElement.wrap', - - # dom/interfaces/json - None. - # All 4 methods of nsIJSON call GetCurrentNativeCallContext. - - # dom/interfaces/load-save - None. - - # dom/interfaces/offline - None. - - # dom/interfaces/range - 'nsIDOMRange.*', - - # dom/interfaces/sidebar - None. - - # dom/interfaces/smil - None. - - # dom/interfaces/storage - 'nsIDOMToString.toString', - 'nsIDOMStorage.setItem', - 'nsIDOMStorage.length', - 'nsIDOMStorage.getItem', - 'nsIDOMStorage.key', - 'nsIDOMStorage.removeItem', - 'nsIDOMStorage.clear', - 'nsIDOMStorageItem.value', - 'nsIDOMStorageWindow.*', - - # dom/interfaces/stylesheets - None. - - # dom/interfaces/svg - None. - - # dom/interfaces/threads - None. - - # dom/interfaces/traversal - 'nsIDOMDocumentTraversal.createNodeIterator', - 'nsIDOMNodeIterator.nextNode', - - # dom/interfaces/views - 'nsIDOMDocumentView.defaultView', - - # dom/interfaces/xbl - None. - - # dom/interfaces/xpath - 'nsIDOMXPathEvaluator.evaluate', - 'nsIDOMXPathEvaluator.createExpression', - 'nsIDOMXPathEvaluator.createNSResolver', - 'nsIDOMXPathExpression.evaluate', - 'nsIDOMXPathNSResolver.lookupNamespaceURI', - 'nsIDOMXPathResult.snapshotItem', - 'nsIDOMXPathResult.iterateNext', - 'nsIDOMXPathResult.snapshotLength', - 'nsIDOMXPathResult.resultType', - 'nsIDOMXPathResult.numberValue', - 'nsIDOMXPathResult.stringValue', - 'nsIDOMXPathResult.booleanValue', - 'nsIDOMXPathResult.singleNodeValue', - 'nsIDOMNSXPathExpression.evaluateWithContext', - - # dom/interfaces/xul - None. - - # XHR - 'nsIXMLHttpRequest.*', - # nsIXMLHttpRequest.channel is not used on the web, and more - # importantly relies on the CAPS check that quickstubs don't make. - '-nsIXMLHttpRequest.channel', - # nsIXMLHttpRequest.open uses the JS stack - '-nsIXMLHttpRequest.open', - # various XHR things use ACString and AUTF8String and [cstring] - # which quickstubs don't handle as return values (or at all in the - # case of AUTF8String) yet. - '-nsIXMLHttpRequest.statusText', - '-nsIXMLHttpRequest.getAllResponseHeaders', - '-nsIXMLHttpRequest.getResponseHeader', - '-nsIXMLHttpRequest.setRequestHeader', - '-nsIXMLHttpRequest.overrideMimeType', - # nsIXMLHttpRequestUpload doesn't live in its own IDL file, so - # can't be quickstubbed - '-nsIXMLHttpRequest.upload', - - # webgl - 'nsICanvasRenderingContextWebGL.*', - # These all use GetCurrentNativeCallContext and should be - # custom-quickstubbed. - '-nsICanvasRenderingContextWebGL.getActiveAttrib', - '-nsICanvasRenderingContextWebGL.getActiveUniform', - '-nsICanvasRenderingContextWebGL.getParameter', - '-nsICanvasRenderingContextWebGL.getBufferParameter', - '-nsICanvasRenderingContextWebGL.getFramebufferAttachmentParameter', - '-nsICanvasRenderingContextWebGL.getRenderbufferParameter', - '-nsICanvasRenderingContextWebGL.getProgramParameter', - '-nsICanvasRenderingContextWebGL.texParameterf', - '-nsICanvasRenderingContextWebGL.texParameteri', - '-nsICanvasRenderingContextWebGL.getUniform', - '-nsICanvasRenderingContextWebGL.getVertexAttrib', - '-nsICanvasRenderingContextWebGL.getShaderParameter', - - # dom/indexedDB - 'nsIIDBCursor.*', - 'nsIIDBDatabase.*', - 'nsIIDBDatabaseException.*', - 'nsIIDBEvent.*', - 'nsIIDBErrorEvent.*', - 'nsIIDBIndex.*', - 'nsIIDBKeyRange.*', - 'nsIIDBObjectStore.*', - 'nsIIDBRequest.*', - 'nsIIDBSuccessEvent.*', - 'nsIIDBTransaction.*', - 'nsIIDBTransactionEvent.*', - 'nsIIDBFactory.*', +# # dom/interfaces/base +# # +# # Note that many implementations of interfaces in this directory +# # use GetCurrentNativeCallContext, notably: +# # - nsIDOMCrypto.{generateCRMFRequest,signText} +# # - nsIDOMLocation.reload +# # - nsIDOMNSHistory.go +# # - nsIDOMJSPluginArray.refresh +# # - nsIDOMWindowInternal.postMessage +# # - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog} +# # +# # (And nsIDOMModalContentWindow.returnValue is an attribute of type +# # nsIVariant, which qsgen.py can't handle.) +# # +# 'nsIDOMWindow.name', +# 'nsIDOMWindow.parent', +# 'nsIDOMWindow.top', +# # Several window properties are magically resolved, including +# # location, _content, navigator, document, and window itself. +# # These do not need quick stubs. +# #'nsIDOMWindow.document', +# 'nsIDOMWindow.getSelection', +# 'nsIDOMWindow.scrollByLines', +# 'nsIDOMJSWindow.dump', +# 'nsIDOMScreen.top', +# 'nsIDOMScreen.height', +# 'nsIDOMScreen.width', +# 'nsIDOMScreen.left', +# 'nsIDOMClientRect.*', +# 'nsIDOMClientRectList.*', +# 'nsIDOMPaintRequest.*', +# 'nsIDOMPaintRequestList.*', +# # nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try. +# #'nsIDOMLocation.hostname', +# #'nsIDOMLocation.href', +# +# # dom/interfaces/canvas +# # +# # nsIDOMCanvasRenderingContext2D and friends +# 'nsIDOMCanvasRenderingContext2D.*', +# 'nsIDOMTextMetrics.*', +# 'nsIDOMCanvasGradient.*', +# 'nsIDOMCanvasPattern.*', +# +# # dom/interfaces/core +# 'nsIDOMCharacterData.data', +# 'nsIDOMCharacterData.length', +# 'nsIDOMDocument.documentElement', +# 'nsIDOMDocument.implementation', +# 'nsIDOMDocument.getElementsByTagName', +# 'nsIDOMDocument.doctype', +# 'nsIDOMDocument.getElementsByTagNameNS', +# 'nsIDOMDocument.getElementById', +# 'nsIDOMDocument.createDocumentFragment', +# 'nsIDOMDocument.createElement', +# 'nsIDOMDocument.importNode', +# 'nsIDOMDocument.createTextNode', +# 'nsIDOMElement.removeAttributeNS', +# 'nsIDOMElement.removeAttribute', +# 'nsIDOMElement.getAttribute', +# 'nsIDOMElement.getElementsByTagName', +# 'nsIDOMElement.setAttribute', +# 'nsIDOMElement.getElementsByTagNameNS', +# 'nsIDOMElement.hasAttributeNS', +# 'nsIDOMElement.tagName', +# 'nsIDOMElement.setAttributeNS', +# 'nsIDOMElement.hasAttribute', +# 'nsIDOMElement.getAttributeNS', +# 'nsIDOMNamedNodeMap.item', +# 'nsIDOMNamedNodeMap.length', +# 'nsIDOMNode.appendChild', +# 'nsIDOMNode.nextSibling', +# 'nsIDOMNode.cloneNode', +# 'nsIDOMNode.firstChild', +# 'nsIDOMNode.prefix', +# 'nsIDOMNode.nodeValue', +# 'nsIDOMNode.childNodes', +# 'nsIDOMNode.normalize', +# 'nsIDOMNode.nodeName', +# 'nsIDOMNode.namespaceURI', +# 'nsIDOMNode.hasChildNodes', +# 'nsIDOMNode.previousSibling', +# 'nsIDOMNode.nodeType', +# 'nsIDOMNode.insertBefore', +# 'nsIDOMNode.replaceChild', +# 'nsIDOMNode.localName', +# 'nsIDOMNode.lastChild', +# 'nsIDOMNode.ownerDocument', +# 'nsIDOMNode.parentNode', +# 'nsIDOMNode.removeChild', +# 'nsIDOMNode.hasAttributes', +# 'nsIDOMNode.attributes', +# 'nsIDOMNodeList.*', +# 'nsIDOMNodeSelector.querySelector', +# 'nsIDOMNodeSelector.querySelectorAll', +# 'nsIDOMText.splitText', +# 'nsIDOM3Document.documentURI', +# 'nsIDOM3Document.adoptNode', +# 'nsIDOM3Document.renameNode', +# 'nsIDOM3Node.*', +# 'nsIDOMDOMStringList.*', +# 'nsIDOMDOMTokenList.*', +# 'nsIDOMDOMSettableTokenList.*', +# 'nsIDOMNameList.getName', +# 'nsIDOMNameList.contains', +# 'nsIDOMNameList.containsNS', +# 'nsIDOMNameList.length', +# 'nsIDOMNameList.getNamespaceURI', +# 'nsIDOMNSDocument.getElementsByClassName', +# 'nsIDOMNSDocument.title', +# 'nsIDOMNSDocument.hasFocus', +# # This property is treated specially in nsDOMClassInfo in a way that +# # would shadow any quick stub. Also, document.location is a special +# # case for security. +# #'nsIDOMNSDocument.location', +# 'nsIDOMNSDocument.elementFromPoint', +# 'nsIDOMNSDocument.activeElement', +# 'nsIDOMXULDocument.getBoxObjectFor', +# 'nsIDOMXMLDocument.evaluateXPointer', +# 'nsIDOMXMLDocument.evaluateFIXptr', +# 'nsIDOMNSElement.getClientRects', +# 'nsIDOMNSElement.getBoundingClientRect', +# 'nsIDOMNSElement.getElementsByClassName', +# 'nsIDOMNSElement.scrollWidth', +# 'nsIDOMNSElement.clientLeft', +# 'nsIDOMNSElement.clientHeight', +# 'nsIDOMNSElement.clientWidth', +# 'nsIDOMNSElement.clientTop', +# 'nsIDOMNSElement.mozMatchesSelector', +# +# # dom/interfaces/css +# 'nsIDOMElementCSSInlineStyle.*', +# 'nsIDOMCSS2Properties.*', +# 'nsIDOMNSCSS2Properties.*', +# 'nsIDOMRect.*', +# 'nsIDOMViewCSS.getComputedStyle', +# +# # dom/interfaces/events +# 'nsIDOMEventTarget.dispatchEvent', +# 'nsIDOMEventTarget.removeEventListener', +# 'nsIDOMNSEventTarget.addEventListener', +# 'nsIDOMDocumentEvent.*', +# +# 'nsIDOMEvent.*', +# 'nsIDOMMouseEvent.*', +# 'nsIDOMKeyEvent.*', +# 'nsIDOMMutationEvent.*', +# 'nsIDOMDragEvent.*', +# 'nsIDOMScrollAreaEvent.*', +# 'nsIDOMNotifyPaintEvent.*', +# 'nsIDOMMessageEvent.*', +# 'nsIDOMMouseScrollEvent.*', +# 'nsIDOMProgressEvent.lengthComputable', +# 'nsIDOMProgressEvent.loaded', +# 'nsIDOMProgressEvent.total', +# #XXX Can't quickstub initProgressEvent because it has long long parameters. +# 'nsIDOMNSEvent.originalTarget', +# 'nsIDOMNSEvent.getPreventDefault', +# 'nsIDOMNSUIEvent.which', +# 'nsIDOMNSUIEvent.rangeParent', +# 'nsIDOMNSUIEvent.rangeOffset', +# 'nsIDOMNSUIEvent.pageX', +# 'nsIDOMNSUIEvent.pageY', +# 'nsIDOMNSUIEvent.isChar', +# +# # dom/interfaces/geolocation - None. +# +# # dom/interfaces/html +# 'nsIDOMHTMLAnchorElement.href', +# 'nsIDOMHTMLAnchorElement.rel', +# 'nsIDOMHTMLAnchorElement.target', +# 'nsIDOMHTMLAnchorElement.name', +# 'nsIDOMHTMLBaseElement.href', +# 'nsIDOMHTMLBaseElement.target', +# 'nsIDOMHTMLButtonElement.name', +# 'nsIDOMHTMLButtonElement.form', +# 'nsIDOMHTMLButtonElement.value', +# 'nsIDOMHTMLButtonElement.disabled', +# 'nsIDOMHTMLCollection.item', +# # This is shadowed by nsIDOMHTMLOptionsCollection.length, +# # but it is also present in other objects where it isn't shadowed. +# # Quick stubs handle the shadowing the same as XPConnect. +# 'nsIDOMHTMLCollection.length', +# 'nsIDOMHTMLDocument.body', +# 'nsIDOMHTMLDocument.getElementsByName', +# 'nsIDOMHTMLDocument.anchors', +# 'nsIDOMHTMLDocument.links', +# 'nsIDOMHTMLDocument.title', +# 'nsIDOMHTMLDocument.URL', +# 'nsIDOMHTMLDocument.referrer', +# 'nsIDOMHTMLDocument.forms', +# 'nsIDOMHTMLDocument.cookie', +# 'nsIDOMHTMLDocument.images', +# 'nsIDOMHTMLDocument.write', +# 'nsIDOMHTMLDocument.writeln', +# 'nsIDOMHTMLElement.className', +# 'nsIDOMHTMLElement.id', +# 'nsIDOMHTMLElement.title', +# 'nsIDOMHTMLFormElement.elements', +# 'nsIDOMHTMLFormElement.name', +# 'nsIDOMHTMLFormElement.submit', +# 'nsIDOMHTMLFormElement.length', +# 'nsIDOMHTMLFormElement.target', +# 'nsIDOMHTMLFormElement.action', +# 'nsIDOMHTMLFrameElement.src', +# 'nsIDOMHTMLFrameElement.contentDocument', +# 'nsIDOMHTMLFrameElement.name', +# 'nsIDOMHTMLFrameSetElement.rows', +# 'nsIDOMHTMLFrameSetElement.cols', +# 'nsIDOMHTMLIFrameElement.src', +# 'nsIDOMHTMLIFrameElement.contentDocument', +# 'nsIDOMHTMLImageElement.src', +# 'nsIDOMHTMLImageElement.name', +# 'nsIDOMHTMLImageElement.height', +# 'nsIDOMHTMLImageElement.width', +# 'nsIDOMHTMLInputElement.defaultChecked', +# 'nsIDOMHTMLInputElement.disabled', +# 'nsIDOMHTMLInputElement.select', +# 'nsIDOMHTMLInputElement.checked', +# 'nsIDOMHTMLInputElement.type', +# 'nsIDOMHTMLInputElement.form', +# 'nsIDOMHTMLInputElement.src', +# 'nsIDOMHTMLInputElement.name', +# 'nsIDOMHTMLInputElement.value', +# 'nsIDOMHTMLLinkElement.disabled', +# 'nsIDOMHTMLOptionElement.index', +# 'nsIDOMHTMLOptionElement.selected', +# 'nsIDOMHTMLOptionElement.form', +# # Readonly, shadowed by nsIDOMNSHTMLOptionElement.text (below). +# #'nsIDOMHTMLOptionElement.text', +# 'nsIDOMHTMLOptionElement.defaultSelected', +# 'nsIDOMHTMLOptionElement.value', +# 'nsIDOMHTMLOptionElement.label', +# 'nsIDOMHTMLOptionElement.disabled', +# 'nsIDOMHTMLOptionsCollection.item', +# 'nsIDOMHTMLOptionsCollection.length', +# 'nsIDOMHTMLSelectElement.name', +# 'nsIDOMHTMLSelectElement.form', +# 'nsIDOMHTMLSelectElement.add', +# 'nsIDOMHTMLSelectElement.value', +# 'nsIDOMHTMLSelectElement.disabled', +# 'nsIDOMHTMLSelectElement.length', +# 'nsIDOMHTMLSelectElement.remove', +# 'nsIDOMHTMLSelectElement.selectedIndex', +# 'nsIDOMHTMLSelectElement.type', +# 'nsIDOMHTMLSelectElement.options', +# 'nsIDOMHTMLSelectElement.size', +# 'nsIDOMHTMLStyleElement.disabled', +# 'nsIDOMHTMLTableCellElement.colSpan', +# 'nsIDOMHTMLTableCellElement.headers', +# 'nsIDOMHTMLTableCellElement.cellIndex', +# 'nsIDOMHTMLTableCellElement.rowSpan', +# 'nsIDOMHTMLTableCellElement.abbr', +# 'nsIDOMHTMLTableCellElement.scope', +# 'nsIDOMHTMLTableCellElement.noWrap', +# 'nsIDOMHTMLTableCellElement.width', +# 'nsIDOMHTMLTableColElement.span', +# 'nsIDOMHTMLTableColElement.width', +# 'nsIDOMHTMLTableElement.rows', +# 'nsIDOMHTMLTableElement.deleteRow', +# 'nsIDOMHTMLTableElement.summary', +# 'nsIDOMHTMLTableElement.insertRow', +# 'nsIDOMHTMLTableRowElement.sectionRowIndex', +# 'nsIDOMHTMLTableRowElement.rowIndex', +# 'nsIDOMHTMLTableRowElement.cells', +# 'nsIDOMHTMLTableRowElement.deleteCell', +# 'nsIDOMHTMLTableRowElement.insertCell', +# 'nsIDOMHTMLTableSectionElement.rows', +# 'nsIDOMHTMLTableSectionElement.insertRow', +# 'nsIDOMHTMLTableSectionElement.deleteRow', +# 'nsIDOMHTMLTextAreaElement.rows', +# 'nsIDOMHTMLTextAreaElement.name', +# 'nsIDOMHTMLTextAreaElement.form', +# 'nsIDOMHTMLTextAreaElement.defaultValue', +# 'nsIDOMHTMLTextAreaElement.cols', +# 'nsIDOMHTMLTextAreaElement.value', +# 'nsIDOMHTMLTextAreaElement.type', +# 'nsIDOMHTMLTextAreaElement.select', +# 'nsIDOMHTMLTitleElement.text', +# 'nsIDOMHTMLCanvasElement.width', +# 'nsIDOMHTMLCanvasElement.height', +# 'nsIDOMHTMLCanvasElement.getContext', +# 'nsIDOMHTMLCanvasElement.toDataURL', +# 'nsIDOMNSHTMLAnchorElement.text', +# 'nsIDOMNSHTMLAnchorElement.search', +# 'nsIDOMNSHTMLAnchorElement.hash', +# 'nsIDOMNSHTMLDocument.width', +# 'nsIDOMNSHTMLDocument.height', +# 'nsIDOMNSHTMLDocument.domain', +# 'nsIDOMNSHTMLDocument.getSelection', +# 'nsIDOMNSHTMLDocument.designMode', +# 'nsIDOMNSHTMLElement.contentEditable', +# 'nsIDOMNSHTMLElement.isContentEditable', +# 'nsIDOMNSHTMLElement.offsetParent', +# 'nsIDOMNSHTMLElement.innerHTML', +# 'nsIDOMNSHTMLElement.offsetLeft', +# 'nsIDOMNSHTMLElement.offsetTop', +# 'nsIDOMNSHTMLElement.offsetHeight', +# 'nsIDOMNSHTMLElement.offsetWidth', +# 'nsIDOMNSHTMLElement.scrollIntoView', +# 'nsIDOMNSHTMLFrameElement.contentWindow', +# 'nsIDOMNSHTMLImageElement.complete', +# 'nsIDOMNSHTMLInputElement.files', +# 'nsIDOMNSHTMLInputElement.textLength', +# 'nsIDOMNSHTMLInputElement.selectionStart', +# 'nsIDOMNSHTMLInputElement.selectionEnd', +# 'nsIDOMNSHTMLInputElement.setSelectionRange', +# 'nsIDOMNSHTMLOptionCollection.selectedIndex', +# 'nsIDOMNSHTMLOptionCollection.add', +# 'nsIDOMNSHTMLOptionElement.text', +# 'nsIDOMNSHTMLSelectElement.item', +# 'nsIDOMNSHTMLTextAreaElement.setSelectionRange', +# 'nsIDOMNSHTMLTextAreaElement.selectionStart', +# 'nsIDOMNSHTMLTextAreaElement.selectionEnd', +# 'nsIDOMNSHTMLTextAreaElement.textLength', +# 'nsIDOMNSHTMLTextAreaElement.wrap', +# +# # dom/interfaces/json - None. +# # All 4 methods of nsIJSON call GetCurrentNativeCallContext. +# +# # dom/interfaces/load-save - None. +# +# # dom/interfaces/offline - None. +# +# # dom/interfaces/range +# 'nsIDOMRange.*', +# +# # dom/interfaces/sidebar - None. +# +# # dom/interfaces/smil - None. +# +# # dom/interfaces/storage +# 'nsIDOMToString.toString', +# 'nsIDOMStorage.setItem', +# 'nsIDOMStorage.length', +# 'nsIDOMStorage.getItem', +# 'nsIDOMStorage.key', +# 'nsIDOMStorage.removeItem', +# 'nsIDOMStorage.clear', +# 'nsIDOMStorageItem.value', +# 'nsIDOMStorageWindow.*', +# +# # dom/interfaces/stylesheets - None. +# +# # dom/interfaces/svg - None. +# +# # dom/interfaces/threads - None. +# +# # dom/interfaces/traversal +# 'nsIDOMDocumentTraversal.createNodeIterator', +# 'nsIDOMNodeIterator.nextNode', +# +# # dom/interfaces/views +# 'nsIDOMDocumentView.defaultView', +# +# # dom/interfaces/xbl - None. +# +# # dom/interfaces/xpath +# 'nsIDOMXPathEvaluator.evaluate', +# 'nsIDOMXPathEvaluator.createExpression', +# 'nsIDOMXPathEvaluator.createNSResolver', +# 'nsIDOMXPathExpression.evaluate', +# 'nsIDOMXPathNSResolver.lookupNamespaceURI', +# 'nsIDOMXPathResult.snapshotItem', +# 'nsIDOMXPathResult.iterateNext', +# 'nsIDOMXPathResult.snapshotLength', +# 'nsIDOMXPathResult.resultType', +# 'nsIDOMXPathResult.numberValue', +# 'nsIDOMXPathResult.stringValue', +# 'nsIDOMXPathResult.booleanValue', +# 'nsIDOMXPathResult.singleNodeValue', +# 'nsIDOMNSXPathExpression.evaluateWithContext', +# +# # dom/interfaces/xul - None. +# +# # XHR +# 'nsIXMLHttpRequest.*', +# # nsIXMLHttpRequest.channel is not used on the web, and more +# # importantly relies on the CAPS check that quickstubs don't make. +# '-nsIXMLHttpRequest.channel', +# # nsIXMLHttpRequest.open uses the JS stack +# '-nsIXMLHttpRequest.open', +# # various XHR things use ACString and AUTF8String and [cstring] +# # which quickstubs don't handle as return values (or at all in the +# # case of AUTF8String) yet. +# '-nsIXMLHttpRequest.statusText', +# '-nsIXMLHttpRequest.getAllResponseHeaders', +# '-nsIXMLHttpRequest.getResponseHeader', +# '-nsIXMLHttpRequest.setRequestHeader', +# '-nsIXMLHttpRequest.overrideMimeType', +# # nsIXMLHttpRequestUpload doesn't live in its own IDL file, so +# # can't be quickstubbed +# '-nsIXMLHttpRequest.upload', +# +# # webgl +# 'nsICanvasRenderingContextWebGL.*', +# # These all use GetCurrentNativeCallContext and should be +# # custom-quickstubbed. +# '-nsICanvasRenderingContextWebGL.getActiveAttrib', +# '-nsICanvasRenderingContextWebGL.getActiveUniform', +# '-nsICanvasRenderingContextWebGL.getParameter', +# '-nsICanvasRenderingContextWebGL.getBufferParameter', +# '-nsICanvasRenderingContextWebGL.getFramebufferAttachmentParameter', +# '-nsICanvasRenderingContextWebGL.getRenderbufferParameter', +# '-nsICanvasRenderingContextWebGL.getProgramParameter', +# '-nsICanvasRenderingContextWebGL.texParameterf', +# '-nsICanvasRenderingContextWebGL.texParameteri', +# '-nsICanvasRenderingContextWebGL.getUniform', +# '-nsICanvasRenderingContextWebGL.getVertexAttrib', +# '-nsICanvasRenderingContextWebGL.getShaderParameter', +# +# # dom/indexedDB +# 'nsIIDBCursor.*', +# 'nsIIDBDatabase.*', +# 'nsIIDBDatabaseException.*', +# 'nsIIDBEvent.*', +# 'nsIIDBErrorEvent.*', +# 'nsIIDBIndex.*', +# 'nsIIDBKeyRange.*', +# 'nsIIDBObjectStore.*', +# 'nsIIDBRequest.*', +# 'nsIIDBSuccessEvent.*', +# 'nsIIDBTransaction.*', +# 'nsIIDBTransactionEvent.*', +# 'nsIIDBFactory.*', ] # Most interfaces can be found by searching the includePath; to find @@ -518,8 +518,8 @@ customIncludes = [ ] customQuickStubs = [ - 'CustomQS_WebGL.h', - 'CustomQS_Canvas2D.h' +# 'CustomQS_WebGL.h', +# 'CustomQS_Canvas2D.h' ] customReturnInterfaces = [ diff --git a/js/src/xpconnect/src/nsXPConnect.cpp b/js/src/xpconnect/src/nsXPConnect.cpp index 02dec06f6868..ed428923c2fd 100644 --- a/js/src/xpconnect/src/nsXPConnect.cpp +++ b/js/src/xpconnect/src/nsXPConnect.cpp @@ -2519,7 +2519,7 @@ nsXPConnect::GetWrapperForObject(JSContext* aJSContext, { JSObject *possibleOuter = objectscope->GetGlobalJSObject(); - Innerize(aJSContext, &possibleOuter); + OBJ_TO_INNER_OBJECT(aJSContext, possibleOuter); if(!possibleOuter) return NS_ERROR_FAILURE; diff --git a/js/src/xpconnect/src/qsgen.py b/js/src/xpconnect/src/qsgen.py index 8c6ce42515d6..d83285a26901 100644 --- a/js/src/xpconnect/src/qsgen.py +++ b/js/src/xpconnect/src/qsgen.py @@ -560,7 +560,7 @@ def writeArgumentUnboxing(f, i, name, type, haveCcx, optional, rvdeclared, f.write(" if (NS_FAILED(rv)) {\n") if isSetter: f.write(" xpc_qsThrowBadSetterValue(" - "cx, rv, JSVAL_TO_OBJECT(*tvr.addr()), id);\n") + "cx, rv, JSVAL_TO_OBJECT(*tvr.jsval_addr()), id);\n") elif haveCcx: f.write(" xpc_qsThrowBadArgWithCcx(ccx, rv, %d);\n" % i) else: @@ -747,7 +747,7 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False): signature = "static JSBool\n" if isAttr: # JSPropertyOp signature. - signature += "%s(JSContext *cx, JSObject *obj, jsval id,%s jsval *vp)\n" + signature += "%s(JSContext *cx, JSObject *obj, jsid id,%s jsval *vp)\n" else: # JSFastNative. signature += "%s(JSContext *cx, uintN argc,%s jsval *vp)\n" @@ -857,7 +857,7 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False): pthisval = 'vp' elif isSetter: f.write(" js::AutoValueRooter tvr(cx);\n") - pthisval = 'tvr.addr()' + pthisval = 'tvr.jsval_addr()' else: pthisval = '&vp[1]' # as above, ok to overwrite vp[1] @@ -986,7 +986,7 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False): if isGetter: thisval = '*vp' else: - thisval = '*tvr.addr()' + thisval = '*tvr.jsval_addr()' f.write(" return xpc_qsThrowGetterSetterFailed(cx, rv, " + "JSVAL_TO_OBJECT(%s), id);\n" % thisval) diff --git a/js/src/xpconnect/src/wrappers/AccessCheck.cpp b/js/src/xpconnect/src/wrappers/AccessCheck.cpp index 4c9019a43421..7ff81d97a2c1 100644 --- a/js/src/xpconnect/src/wrappers/AccessCheck.cpp +++ b/js/src/xpconnect/src/wrappers/AccessCheck.cpp @@ -76,10 +76,15 @@ AccessCheck::isPrivileged(JSCompartment *compartment) void AccessCheck::deny(JSContext *cx, jsid id) { - if(id == JSVAL_VOID) { + if(id == JSID_VOID) { JS_ReportError(cx, "Permission denied to access object"); } else { - JSString *str = JS_ValueToString(cx, id); + jsval idval; + if (!JS_IdToValue(cx, id, &idval)) + return; + JSString *str = JS_ValueToString(cx, idval); + if (!str) + return; JS_ReportError(cx, "Permission denied to access property '%hs'", str); } } diff --git a/js/src/xpconnect/src/wrappers/ChromeWrapper.cpp b/js/src/xpconnect/src/wrappers/ChromeWrapper.cpp index 56df424ca3c1..707305a40742 100644 --- a/js/src/xpconnect/src/wrappers/ChromeWrapper.cpp +++ b/js/src/xpconnect/src/wrappers/ChromeWrapper.cpp @@ -171,10 +171,10 @@ GetHallPass(JSContext *cx, JSObject *wrappedObject, jsid id, JSObject **hallpass } static bool -Filter(JSContext *cx, JSObject *wrappedObject, AutoValueVector &props) +Filter(JSContext *cx, JSObject *wrappedObject, AutoIdVector &props) { JSObject *hallpass; - if(!GetHallPass(cx, wrappedObject, JSVAL_VOID, &hallpass)) + if(!GetHallPass(cx, wrappedObject, JSID_VOID, &hallpass)) return false; if(!hallpass) return true; @@ -193,28 +193,28 @@ Filter(JSContext *cx, JSObject *wrappedObject, AutoValueVector &props) } bool -ChromeWrapper::getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoValueVector &props) +ChromeWrapper::getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props) { return JSCrossCompartmentWrapper::getOwnPropertyNames(cx, wrapper, props) && Filter(cx, wrappedObject(wrapper), props); } bool -ChromeWrapper::enumerate(JSContext *cx, JSObject *wrapper, AutoValueVector &props) +ChromeWrapper::enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props) { return JSCrossCompartmentWrapper::enumerate(cx, wrapper, props) && Filter(cx, wrappedObject(wrapper), props); } bool -ChromeWrapper::enumerateOwn(JSContext *cx, JSObject *wrapper, AutoValueVector &props) +ChromeWrapper::enumerateOwn(JSContext *cx, JSObject *wrapper, AutoIdVector &props) { return JSCrossCompartmentWrapper::enumerateOwn(cx, wrapper, props) && Filter(cx, wrappedObject(wrapper), props); } bool -ChromeWrapper::iterate(JSContext *cx, JSObject *wrapper, uintN flags, jsval *vp) +ChromeWrapper::iterate(JSContext *cx, JSObject *wrapper, uintN flags, Value *vp) { // We refuse to trigger the iterator hook across chrome wrappers because // we don't know how to censor custom iterator objects. Instead we trigger diff --git a/js/src/xpconnect/src/wrappers/ChromeWrapper.h b/js/src/xpconnect/src/wrappers/ChromeWrapper.h index a63c1ebf479e..c6fb135beb88 100644 --- a/js/src/xpconnect/src/wrappers/ChromeWrapper.h +++ b/js/src/xpconnect/src/wrappers/ChromeWrapper.h @@ -47,10 +47,10 @@ class ChromeWrapper : public JSCrossCompartmentWrapper { ChromeWrapper(); virtual ~ChromeWrapper(); - virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, js::AutoValueVector &props); - virtual bool enumerate(JSContext *cx, JSObject *wrapper, js::AutoValueVector &props); - virtual bool enumerateOwn(JSContext *cx, JSObject *wrapper, js::AutoValueVector &props); - virtual bool iterate(JSContext *cx, JSObject *proxy, uintN flags, jsval *vp); + virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, js::AutoIdVector &props); + virtual bool enumerate(JSContext *cx, JSObject *wrapper, js::AutoIdVector &props); + virtual bool enumerateOwn(JSContext *cx, JSObject *wrapper, js::AutoIdVector &props); + virtual bool iterate(JSContext *cx, JSObject *proxy, uintN flags, js::Value *vp); virtual bool enter(JSContext *cx, JSObject *wrapper, jsid id, Mode mode); diff --git a/js/src/xpconnect/src/xpccomponents.cpp b/js/src/xpconnect/src/xpccomponents.cpp index e19256df1e80..6480112da7e7 100644 --- a/js/src/xpconnect/src/xpccomponents.cpp +++ b/js/src/xpconnect/src/xpccomponents.cpp @@ -2799,7 +2799,7 @@ nsXPCComponents_Utils::LookupMethod() if(NS_FAILED(rv)) return rv; - Innerize(cx, &obj); + OBJ_TO_INNER_OBJECT(cx, obj); if(!obj) return NS_ERROR_XPC_BAD_CONVERT_JS; @@ -3246,7 +3246,7 @@ xpc_CreateSandboxObject(JSContext * cx, jsval * vp, nsISupports *prinOrSop) JSPRINCIPALS_DROP(cx, jsPrincipals); if (!sandbox) return NS_ERROR_XPC_UNEXPECTED; - js::AutoValueRooter tvr(cx, sandbox); + js::AutoObjectRooter tvr(cx, sandbox); { JSAutoCrossCompartmentCall ac; diff --git a/js/src/xpconnect/src/xpcconvert.cpp b/js/src/xpconnect/src/xpcconvert.cpp index e0c3a9045d1f..2d755398ed5f 100644 --- a/js/src/xpconnect/src/xpcconvert.cpp +++ b/js/src/xpconnect/src/xpcconvert.cpp @@ -1589,7 +1589,7 @@ class AutoExceptionRestorer { public: AutoExceptionRestorer(JSContext *cx, jsval v) - : mContext(cx), tvr(cx, js::Valueify(v)) + : mContext(cx), tvr(cx, v) { JS_ClearPendingException(mContext); } diff --git a/js/src/xpconnect/src/xpcprivate.h b/js/src/xpconnect/src/xpcprivate.h index 70aa99f2cf3e..9bd62b9aa7f7 100644 --- a/js/src/xpconnect/src/xpcprivate.h +++ b/js/src/xpconnect/src/xpcprivate.h @@ -2642,7 +2642,7 @@ public: JSObject* GetWrapper() { - return (JSObject *) (mWrapperWord & FLAG_MASK); + return (JSObject *) (mWrapperWord & ~(PRWord)FLAG_MASK); } void SetWrapper(JSObject *obj) { @@ -2693,7 +2693,9 @@ private: DOUBLE_WRAPPER = JS_BIT(1), NEEDS_XOW = JS_BIT(2), - LAST_FLAG = NEEDS_XOW + LAST_FLAG = NEEDS_XOW, + + FLAG_MASK = 0x3 }; protected: diff --git a/js/src/xpconnect/src/xpcwrappednative.cpp b/js/src/xpconnect/src/xpcwrappednative.cpp index 2fe8e35c87ed..4ea513d1dfd5 100644 --- a/js/src/xpconnect/src/xpcwrappednative.cpp +++ b/js/src/xpconnect/src/xpcwrappednative.cpp @@ -858,7 +858,6 @@ XPCWrappedNative::XPCWrappedNative(already_AddRefed aIdentity, mScriptableInfo(nsnull), mWrapperWord(0) { - PR_STATIC_ASSERT(LAST_FLAG & JSVAL_TAGMASK); mIdentity = aIdentity.get(); NS_ASSERTION(mMaybeProto, "bad ctor param"); diff --git a/js/src/xpconnect/src/xpcwrappednativejsops.cpp b/js/src/xpconnect/src/xpcwrappednativejsops.cpp index c54e6d2b42f8..8615ad6d9444 100644 --- a/js/src/xpconnect/src/xpcwrappednativejsops.cpp +++ b/js/src/xpconnect/src/xpcwrappednativejsops.cpp @@ -1448,7 +1448,7 @@ XPC_WN_JSOp_ThisObject(JSContext *cx, JSObject *obj) if(!XPCPerThreadData::IsMainThread(cx)) return obj; - Outerize(cx, &obj); + OBJ_TO_OUTER_OBJECT(cx, obj); if(!obj) return nsnull;