Browser build fixes (stuff still broken)

This commit is contained in:
Luke Wagner 2010-07-04 12:35:21 -07:00
parent fe91c15325
commit 684b18d388
21 changed files with 510 additions and 490 deletions

View File

@ -1547,7 +1547,8 @@ jsid nsDOMClassInfo::sOnpopstate_id = JSID_VOID;
jsid nsDOMClassInfo::sOnbeforeunload_id = JSID_VOID; jsid nsDOMClassInfo::sOnbeforeunload_id = JSID_VOID;
jsid nsDOMClassInfo::sOnunload_id = JSID_VOID; jsid nsDOMClassInfo::sOnunload_id = JSID_VOID;
jsid nsDOMClassInfo::sOnhashchange_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::sOnpagehide_id = JSID_VOID;
jsid nsDOMClassInfo::sOnabort_id = JSID_VOID; jsid nsDOMClassInfo::sOnabort_id = JSID_VOID;
jsid nsDOMClassInfo::sOnerror_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(sOnunload_id, cx, "onunload");
SET_JSID_TO_STRING(sOnhashchange_id, cx, "onhashchange"); SET_JSID_TO_STRING(sOnhashchange_id, cx, "onhashchange");
SET_JSID_TO_STRING(sOnreadystatechange_id, cx, "onreadystatechange"); 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(sOnpagehide_id, cx, "onpagehide");
SET_JSID_TO_STRING(sOnabort_id, cx, "onabort"); SET_JSID_TO_STRING(sOnabort_id, cx, "onabort");
SET_JSID_TO_STRING(sOnerror_id, cx, "onerror"); SET_JSID_TO_STRING(sOnerror_id, cx, "onerror");
@ -4761,6 +4763,7 @@ nsDOMClassInfo::ShutDown()
sOnunload_id = JSID_VOID; sOnunload_id = JSID_VOID;
sOnhashchange_id = JSID_VOID; sOnhashchange_id = JSID_VOID;
sOnreadystatechange_id = JSID_VOID; sOnreadystatechange_id = JSID_VOID;
sOnpageshow_id = JSID_VOID;
sOnpagehide_id = JSID_VOID; sOnpagehide_id = JSID_VOID;
sOnabort_id = JSID_VOID; sOnabort_id = JSID_VOID;
sOnerror_id = JSID_VOID; sOnerror_id = JSID_VOID;

View File

@ -322,6 +322,7 @@ protected:
static jsid sOnunload_id; static jsid sOnunload_id;
static jsid sOnhashchange_id; static jsid sOnhashchange_id;
static jsid sOnreadystatechange_id; static jsid sOnreadystatechange_id;
static jsid sOnpageshow_id;
static jsid sOnpagehide_id; static jsid sOnpagehide_id;
static jsid sOnabort_id; static jsid sOnabort_id;
static jsid sOnerror_id; static jsid sOnerror_id;

View File

@ -436,7 +436,7 @@ IDBCursor::Update(jsval aValue,
js::AutoValueRooter clone(aCx); js::AutoValueRooter clone(aCx);
nsresult rv = nsContentUtils::CreateStructuredClone(aCx, aValue, nsresult rv = nsContentUtils::CreateStructuredClone(aCx, aValue,
clone.addr()); clone.jsval_addr());
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
return rv; return rv;
} }
@ -449,22 +449,22 @@ IDBCursor::Update(jsval aValue,
const size_t keyPathLen = keyPath.Length(); const size_t keyPathLen = keyPath.Length();
js::AutoValueRooter prop(aCx); js::AutoValueRooter prop(aCx);
JSBool ok = JS_GetUCProperty(aCx, JSVAL_TO_OBJECT(clone.value()), JSBool ok = JS_GetUCProperty(aCx, JSVAL_TO_OBJECT(clone.jsval_value()),
keyPathChars, keyPathLen, prop.addr()); keyPathChars, keyPathLen, prop.jsval_addr());
NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
if (JSVAL_IS_VOID(prop.value())) { if (JSVAL_IS_VOID(prop.jsval_value())) {
rv = IDBObjectStore::GetJSValFromKey(key, aCx, prop.addr()); rv = IDBObjectStore::GetJSValFromKey(key, aCx, prop.jsval_addr());
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
ok = JS_DefineUCProperty(aCx, JSVAL_TO_OBJECT(clone.value()), ok = JS_DefineUCProperty(aCx, JSVAL_TO_OBJECT(clone.jsval_value()),
keyPathChars, keyPathLen, prop.value(), nsnull, keyPathChars, keyPathLen, prop.jsval_value(), nsnull,
nsnull, JSPROP_ENUMERATE); nsnull, JSPROP_ENUMERATE);
NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
} }
else { else {
Key newKey; Key newKey;
rv = IDBObjectStore::GetKeyFromJSVal(prop.value(), newKey); rv = IDBObjectStore::GetKeyFromJSVal(prop.jsval_value(), newKey);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
if (newKey.IsUnset() || newKey.IsNull() || newKey != key) { if (newKey.IsUnset() || newKey.IsNull() || newKey != key) {
@ -475,13 +475,13 @@ IDBCursor::Update(jsval aValue,
nsTArray<IndexUpdateInfo> indexUpdateInfo; nsTArray<IndexUpdateInfo> indexUpdateInfo;
rv = IDBObjectStore::GetIndexUpdateInfo(mObjectStore->GetObjectStoreInfo(), rv = IDBObjectStore::GetIndexUpdateInfo(mObjectStore->GetObjectStoreInfo(),
aCx, clone.value(), indexUpdateInfo); aCx, clone.jsval_value(), indexUpdateInfo);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIJSON> json(new nsJSON()); nsCOMPtr<nsIJSON> json(new nsJSON());
nsString jsonValue; nsString jsonValue;
rv = json->EncodeFromJSVal(clone.addr(), aCx, jsonValue); rv = json->EncodeFromJSVal(clone.jsval_addr(), aCx, jsonValue);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
nsRefPtr<IDBRequest> request = GenerateWriteRequest(); nsRefPtr<IDBRequest> request = GenerateWriteRequest();

View File

@ -473,14 +473,14 @@ GetAllSuccessEvent::GetResult(JSContext* aCx,
nsString jsonValue = values[index]; nsString jsonValue = values[index];
values[index].Truncate(); values[index].Truncate();
nsresult rv = json->DecodeToJSVal(jsonValue, aCx, value.addr()); nsresult rv = json->DecodeToJSVal(jsonValue, aCx, value.jsval_addr());
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
mCachedValue = JSVAL_VOID; mCachedValue = JSVAL_VOID;
NS_ERROR("Failed to decode!"); NS_ERROR("Failed to decode!");
return rv; return rv;
} }
if (!JS_SetElement(aCx, array, index, value.addr())) { if (!JS_SetElement(aCx, array, index, value.jsval_addr())) {
mCachedValue = JSVAL_VOID; mCachedValue = JSVAL_VOID;
NS_ERROR("Failed to set array element!"); NS_ERROR("Failed to set array element!");
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
@ -539,14 +539,14 @@ GetAllKeySuccessEvent::GetResult(JSContext* aCx,
const Key& key = keys[index]; const Key& key = keys[index];
NS_ASSERTION(!key.IsUnset() && !key.IsNull(), "Bad key!"); 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)) { if (NS_FAILED(rv)) {
mCachedValue = JSVAL_VOID; mCachedValue = JSVAL_VOID;
NS_WARNING("Failed to get jsval for key!"); NS_WARNING("Failed to get jsval for key!");
return rv; return rv;
} }
if (!JS_SetElement(aCx, array, index, value.addr())) { if (!JS_SetElement(aCx, array, index, value.jsval_addr())) {
mCachedValue = JSVAL_VOID; mCachedValue = JSVAL_VOID;
NS_WARNING("Failed to set array element!"); NS_WARNING("Failed to set array element!");
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;

View File

@ -373,7 +373,7 @@ IDBObjectStore::GetKeyFromJSVal(jsval aKeyVal,
aKey = JSVAL_TO_INT(aKeyVal); aKey = JSVAL_TO_INT(aKeyVal);
} }
else if (JSVAL_IS_DOUBLE(aKeyVal)) { else if (JSVAL_IS_DOUBLE(aKeyVal)) {
aKey = *JSVAL_TO_DOUBLE(aKeyVal); aKey = JSVAL_TO_DOUBLE(aKeyVal);
} }
else { else {
return NS_ERROR_INVALID_ARG; return NS_ERROR_INVALID_ARG;
@ -452,14 +452,14 @@ IDBObjectStore::GetJSONFromArg0(/* jsval arg0, */
JSAutoRequest ar(cx); JSAutoRequest ar(cx);
js::AutoValueRooter clone(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)) { if (NS_FAILED(rv)) {
return rv; return rv;
} }
nsCOMPtr<nsIJSON> json(new nsJSON()); nsCOMPtr<nsIJSON> json(new nsJSON());
rv = json->EncodeFromJSVal(clone.addr(), cx, aJSON); rv = json->EncodeFromJSVal(clone.jsval_addr(), cx, aJSON);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
return NS_OK; return NS_OK;
@ -488,16 +488,16 @@ IDBObjectStore::GetKeyPathValueFromJSON(const nsAString& aJSON,
js::AutoValueRooter clone(*aCx); js::AutoValueRooter clone(*aCx);
nsCOMPtr<nsIJSON> json(new nsJSON()); nsCOMPtr<nsIJSON> json(new nsJSON());
rv = json->DecodeToJSVal(aJSON, *aCx, clone.addr()); rv = json->DecodeToJSVal(aJSON, *aCx, clone.jsval_addr());
NS_ENSURE_SUCCESS(rv, rv); 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. // This isn't an object, so just leave the key unset.
aValue = Key::UNSETKEY; aValue = Key::UNSETKEY;
return NS_OK; return NS_OK;
} }
JSObject* obj = JSVAL_TO_OBJECT(clone.value()); JSObject* obj = JSVAL_TO_OBJECT(clone.jsval_value());
const jschar* keyPathChars = const jschar* keyPathChars =
reinterpret_cast<const jschar*>(aKeyPath.BeginReading()); reinterpret_cast<const jschar*>(aKeyPath.BeginReading());
@ -505,10 +505,10 @@ IDBObjectStore::GetKeyPathValueFromJSON(const nsAString& aJSON,
js::AutoValueRooter value(*aCx); js::AutoValueRooter value(*aCx);
JSBool ok = JS_GetUCProperty(*aCx, obj, keyPathChars, keyPathLen, JSBool ok = JS_GetUCProperty(*aCx, obj, keyPathChars, keyPathLen,
value.addr()); value.jsval_addr());
NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); 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 (NS_FAILED(rv) || aValue.IsNull()) {
// If the object doesn't have a value that we can use for our index then we // If the object doesn't have a value that we can use for our index then we
// leave it unset. // leave it unset.
@ -729,7 +729,7 @@ IDBObjectStore::GetAddInfo(JSContext* aCx,
js::AutoValueRooter clone(aCx); js::AutoValueRooter clone(aCx);
nsresult rv = nsContentUtils::CreateStructuredClone(aCx, aValue, nsresult rv = nsContentUtils::CreateStructuredClone(aCx, aValue,
clone.addr()); clone.jsval_addr());
if (NS_FAILED(rv)) { if (NS_FAILED(rv)) {
return rv; return rv;
} }
@ -740,11 +740,11 @@ IDBObjectStore::GetAddInfo(JSContext* aCx,
} }
else { else {
// Inline keys live on the object. Make sure it is an object. // 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; 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); NS_ENSURE_SUCCESS(rv, rv);
// Except if null was passed, in which case we're supposed to generate the // 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(); ObjectStoreInfo* objectStoreInfo = GetObjectStoreInfo();
NS_ENSURE_TRUE(objectStoreInfo, NS_ERROR_FAILURE); 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); NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIJSON> json(new nsJSON()); nsCOMPtr<nsIJSON> json(new nsJSON());
rv = json->EncodeFromJSVal(clone.addr(), aCx, aJSON); rv = json->EncodeFromJSVal(clone.jsval_addr(), aCx, aJSON);
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
return NS_OK; return NS_OK;
@ -1473,10 +1473,10 @@ AddHelper::ModifyValueForNewKey()
js::AutoValueRooter clone(cx); js::AutoValueRooter clone(cx);
nsCOMPtr<nsIJSON> json(new nsJSON()); nsCOMPtr<nsIJSON> json(new nsJSON());
rv = json->DecodeToJSVal(mValue, cx, clone.addr()); rv = json->DecodeToJSVal(mValue, cx, clone.jsval_addr());
NS_ENSURE_SUCCESS(rv, rv); NS_ENSURE_SUCCESS(rv, rv);
JSObject* obj = JSVAL_TO_OBJECT(clone.value()); JSObject* obj = JSVAL_TO_OBJECT(clone.jsval_value());
JSBool ok; JSBool ok;
js::AutoValueRooter key(cx); js::AutoValueRooter key(cx);
@ -1484,18 +1484,18 @@ AddHelper::ModifyValueForNewKey()
const size_t keyPathLen = mKeyPath.Length(); const size_t keyPathLen = mKeyPath.Length();
#ifdef DEBUG #ifdef DEBUG
ok = JS_GetUCProperty(cx, obj, keyPathChars, keyPathLen, key.addr()); ok = JS_GetUCProperty(cx, obj, keyPathChars, keyPathLen, key.jsval_addr());
NS_ASSERTION(ok && JSVAL_IS_VOID(key.value()), "Already has a key prop!"); NS_ASSERTION(ok && JSVAL_IS_VOID(key.jsval_value()), "Already has a key prop!");
#endif #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); 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); nsnull, nsnull, JSPROP_ENUMERATE);
NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE); 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); NS_ENSURE_SUCCESS(rv, rv);
return NS_OK; return NS_OK;

View File

@ -2308,6 +2308,13 @@ class AutoValueRooter : private AutoGCRooter
JS_GUARD_OBJECT_NOTIFIER_INIT; 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; * If you are looking for Object* overloads, use AutoObjectRooter instead;
* rooting Object*s as a js::Value requires discerning whether or not it is * rooting Object*s as a js::Value requires discerning whether or not it is

View File

@ -137,8 +137,8 @@ struct JSStackFrame
* also used in some other cases --- entering 'with' blocks, for * also used in some other cases --- entering 'with' blocks, for
* example. * example.
*/ */
JSObject *blockChain;
JSObject *scopeChain; JSObject *scopeChain;
JSObject *blockChain;
uint32 flags; /* frame flags -- see below */ uint32 flags; /* frame flags -- see below */
JSStackFrame *displaySave; /* previous value of display entry for 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, rval) % sizeof(Value) == 0);
JS_STATIC_ASSERT(offsetof(JSStackFrame, thisv) % sizeof(Value) == 0); JS_STATIC_ASSERT(offsetof(JSStackFrame, thisv) % sizeof(Value) == 0);
JS_STATIC_ASSERT(offsetof(JSStackFrame, scopeChain) % sizeof(Value) == 0);
} /* namespace js */ } /* namespace js */

View File

@ -278,6 +278,10 @@ struct JSObject {
JSObject *proto; /* object's prototype */ JSObject *proto; /* object's prototype */
js::Value *dslots; /* dynamically allocated slots */ js::Value *dslots; /* dynamically allocated slots */
#if JS_BITS_PER_WORD == 32 #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; uint32 padding;
#endif #endif
js::Value fslots[JS_INITIAL_NSLOTS]; /* small number of fixed slots */ js::Value fslots[JS_INITIAL_NSLOTS]; /* small number of fixed slots */

View File

@ -261,7 +261,7 @@ CanAccessWrapper(JSContext *cx, JSObject *outerObj, JSObject *wrappedObj,
JSObject *innerParent = wrappedObj->getParent(); JSObject *innerParent = wrappedObj->getParent();
if (!innerParent) { if (!innerParent) {
innerParent = wrappedObj; innerParent = wrappedObj;
Innerize(cx, &innerParent); OBJ_TO_INNER_OBJECT(cx, innerParent);
if (!innerParent) { if (!innerParent) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }

View File

@ -591,7 +591,7 @@ XPC_NW_NewResolve(JSContext *cx, JSObject *obj, jsid id, uintN flags,
} }
JSObject *funobj = JS_GetFunctionObject(fun); JSObject *funobj = JS_GetFunctionObject(fun);
funobj->setParent(js::ObjectOrNullTag(obj)); funobj->setParent(obj);
return JS_DefineProperty(cx, obj, "toString", OBJECT_TO_JSVAL(funobj), return JS_DefineProperty(cx, obj, "toString", OBJECT_TO_JSVAL(funobj),
nsnull, nsnull, 0); nsnull, nsnull, 0);

View File

@ -48,431 +48,431 @@ name = 'DOM'
# doesn't crash--it may in fact return a plausible wrong answer. # doesn't crash--it may in fact return a plausible wrong answer.
members = [ members = [
# dom/interfaces/base # # dom/interfaces/base
# # #
# Note that many implementations of interfaces in this directory # # Note that many implementations of interfaces in this directory
# use GetCurrentNativeCallContext, notably: # # use GetCurrentNativeCallContext, notably:
# - nsIDOMCrypto.{generateCRMFRequest,signText} # # - nsIDOMCrypto.{generateCRMFRequest,signText}
# - nsIDOMLocation.reload # # - nsIDOMLocation.reload
# - nsIDOMNSHistory.go # # - nsIDOMNSHistory.go
# - nsIDOMJSPluginArray.refresh # # - nsIDOMJSPluginArray.refresh
# - nsIDOMWindowInternal.postMessage # # - nsIDOMWindowInternal.postMessage
# - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog} # # - nsIDOMJSWindow.{prompt,setTimeout,setInterval,open,openDialog}
# # #
# (And nsIDOMModalContentWindow.returnValue is an attribute of type # # (And nsIDOMModalContentWindow.returnValue is an attribute of type
# nsIVariant, which qsgen.py can't handle.) # # nsIVariant, which qsgen.py can't handle.)
# # #
'nsIDOMWindow.name', # 'nsIDOMWindow.name',
'nsIDOMWindow.parent', # 'nsIDOMWindow.parent',
'nsIDOMWindow.top', # 'nsIDOMWindow.top',
# Several window properties are magically resolved, including # # Several window properties are magically resolved, including
# location, _content, navigator, document, and window itself. # # location, _content, navigator, document, and window itself.
# These do not need quick stubs. # # These do not need quick stubs.
#'nsIDOMWindow.document', # #'nsIDOMWindow.document',
'nsIDOMWindow.getSelection', # 'nsIDOMWindow.getSelection',
'nsIDOMWindow.scrollByLines', # 'nsIDOMWindow.scrollByLines',
'nsIDOMJSWindow.dump', # 'nsIDOMJSWindow.dump',
'nsIDOMScreen.top', # 'nsIDOMScreen.top',
'nsIDOMScreen.height', # 'nsIDOMScreen.height',
'nsIDOMScreen.width', # 'nsIDOMScreen.width',
'nsIDOMScreen.left', # 'nsIDOMScreen.left',
'nsIDOMClientRect.*', # 'nsIDOMClientRect.*',
'nsIDOMClientRectList.*', # 'nsIDOMClientRectList.*',
'nsIDOMPaintRequest.*', # 'nsIDOMPaintRequest.*',
'nsIDOMPaintRequestList.*', # 'nsIDOMPaintRequestList.*',
# nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try. # # nsLocationSH has ~ALLOW_PROP_MODS_TO_PROTOTYPE, so don't try.
#'nsIDOMLocation.hostname', # #'nsIDOMLocation.hostname',
#'nsIDOMLocation.href', # #'nsIDOMLocation.href',
#
# dom/interfaces/canvas # # dom/interfaces/canvas
# # #
# nsIDOMCanvasRenderingContext2D and friends # # nsIDOMCanvasRenderingContext2D and friends
'nsIDOMCanvasRenderingContext2D.*', # 'nsIDOMCanvasRenderingContext2D.*',
'nsIDOMTextMetrics.*', # 'nsIDOMTextMetrics.*',
'nsIDOMCanvasGradient.*', # 'nsIDOMCanvasGradient.*',
'nsIDOMCanvasPattern.*', # 'nsIDOMCanvasPattern.*',
#
# dom/interfaces/core # # dom/interfaces/core
'nsIDOMCharacterData.data', # 'nsIDOMCharacterData.data',
'nsIDOMCharacterData.length', # 'nsIDOMCharacterData.length',
'nsIDOMDocument.documentElement', # 'nsIDOMDocument.documentElement',
'nsIDOMDocument.implementation', # 'nsIDOMDocument.implementation',
'nsIDOMDocument.getElementsByTagName', # 'nsIDOMDocument.getElementsByTagName',
'nsIDOMDocument.doctype', # 'nsIDOMDocument.doctype',
'nsIDOMDocument.getElementsByTagNameNS', # 'nsIDOMDocument.getElementsByTagNameNS',
'nsIDOMDocument.getElementById', # 'nsIDOMDocument.getElementById',
'nsIDOMDocument.createDocumentFragment', # 'nsIDOMDocument.createDocumentFragment',
'nsIDOMDocument.createElement', # 'nsIDOMDocument.createElement',
'nsIDOMDocument.importNode', # 'nsIDOMDocument.importNode',
'nsIDOMDocument.createTextNode', # 'nsIDOMDocument.createTextNode',
'nsIDOMElement.removeAttributeNS', # 'nsIDOMElement.removeAttributeNS',
'nsIDOMElement.removeAttribute', # 'nsIDOMElement.removeAttribute',
'nsIDOMElement.getAttribute', # 'nsIDOMElement.getAttribute',
'nsIDOMElement.getElementsByTagName', # 'nsIDOMElement.getElementsByTagName',
'nsIDOMElement.setAttribute', # 'nsIDOMElement.setAttribute',
'nsIDOMElement.getElementsByTagNameNS', # 'nsIDOMElement.getElementsByTagNameNS',
'nsIDOMElement.hasAttributeNS', # 'nsIDOMElement.hasAttributeNS',
'nsIDOMElement.tagName', # 'nsIDOMElement.tagName',
'nsIDOMElement.setAttributeNS', # 'nsIDOMElement.setAttributeNS',
'nsIDOMElement.hasAttribute', # 'nsIDOMElement.hasAttribute',
'nsIDOMElement.getAttributeNS', # 'nsIDOMElement.getAttributeNS',
'nsIDOMNamedNodeMap.item', # 'nsIDOMNamedNodeMap.item',
'nsIDOMNamedNodeMap.length', # 'nsIDOMNamedNodeMap.length',
'nsIDOMNode.appendChild', # 'nsIDOMNode.appendChild',
'nsIDOMNode.nextSibling', # 'nsIDOMNode.nextSibling',
'nsIDOMNode.cloneNode', # 'nsIDOMNode.cloneNode',
'nsIDOMNode.firstChild', # 'nsIDOMNode.firstChild',
'nsIDOMNode.prefix', # 'nsIDOMNode.prefix',
'nsIDOMNode.nodeValue', # 'nsIDOMNode.nodeValue',
'nsIDOMNode.childNodes', # 'nsIDOMNode.childNodes',
'nsIDOMNode.normalize', # 'nsIDOMNode.normalize',
'nsIDOMNode.nodeName', # 'nsIDOMNode.nodeName',
'nsIDOMNode.namespaceURI', # 'nsIDOMNode.namespaceURI',
'nsIDOMNode.hasChildNodes', # 'nsIDOMNode.hasChildNodes',
'nsIDOMNode.previousSibling', # 'nsIDOMNode.previousSibling',
'nsIDOMNode.nodeType', # 'nsIDOMNode.nodeType',
'nsIDOMNode.insertBefore', # 'nsIDOMNode.insertBefore',
'nsIDOMNode.replaceChild', # 'nsIDOMNode.replaceChild',
'nsIDOMNode.localName', # 'nsIDOMNode.localName',
'nsIDOMNode.lastChild', # 'nsIDOMNode.lastChild',
'nsIDOMNode.ownerDocument', # 'nsIDOMNode.ownerDocument',
'nsIDOMNode.parentNode', # 'nsIDOMNode.parentNode',
'nsIDOMNode.removeChild', # 'nsIDOMNode.removeChild',
'nsIDOMNode.hasAttributes', # 'nsIDOMNode.hasAttributes',
'nsIDOMNode.attributes', # 'nsIDOMNode.attributes',
'nsIDOMNodeList.*', # 'nsIDOMNodeList.*',
'nsIDOMNodeSelector.querySelector', # 'nsIDOMNodeSelector.querySelector',
'nsIDOMNodeSelector.querySelectorAll', # 'nsIDOMNodeSelector.querySelectorAll',
'nsIDOMText.splitText', # 'nsIDOMText.splitText',
'nsIDOM3Document.documentURI', # 'nsIDOM3Document.documentURI',
'nsIDOM3Document.adoptNode', # 'nsIDOM3Document.adoptNode',
'nsIDOM3Document.renameNode', # 'nsIDOM3Document.renameNode',
'nsIDOM3Node.*', # 'nsIDOM3Node.*',
'nsIDOMDOMStringList.*', # 'nsIDOMDOMStringList.*',
'nsIDOMDOMTokenList.*', # 'nsIDOMDOMTokenList.*',
'nsIDOMDOMSettableTokenList.*', # 'nsIDOMDOMSettableTokenList.*',
'nsIDOMNameList.getName', # 'nsIDOMNameList.getName',
'nsIDOMNameList.contains', # 'nsIDOMNameList.contains',
'nsIDOMNameList.containsNS', # 'nsIDOMNameList.containsNS',
'nsIDOMNameList.length', # 'nsIDOMNameList.length',
'nsIDOMNameList.getNamespaceURI', # 'nsIDOMNameList.getNamespaceURI',
'nsIDOMNSDocument.getElementsByClassName', # 'nsIDOMNSDocument.getElementsByClassName',
'nsIDOMNSDocument.title', # 'nsIDOMNSDocument.title',
'nsIDOMNSDocument.hasFocus', # 'nsIDOMNSDocument.hasFocus',
# This property is treated specially in nsDOMClassInfo in a way that # # This property is treated specially in nsDOMClassInfo in a way that
# would shadow any quick stub. Also, document.location is a special # # would shadow any quick stub. Also, document.location is a special
# case for security. # # case for security.
#'nsIDOMNSDocument.location', # #'nsIDOMNSDocument.location',
'nsIDOMNSDocument.elementFromPoint', # 'nsIDOMNSDocument.elementFromPoint',
'nsIDOMNSDocument.activeElement', # 'nsIDOMNSDocument.activeElement',
'nsIDOMXULDocument.getBoxObjectFor', # 'nsIDOMXULDocument.getBoxObjectFor',
'nsIDOMXMLDocument.evaluateXPointer', # 'nsIDOMXMLDocument.evaluateXPointer',
'nsIDOMXMLDocument.evaluateFIXptr', # 'nsIDOMXMLDocument.evaluateFIXptr',
'nsIDOMNSElement.getClientRects', # 'nsIDOMNSElement.getClientRects',
'nsIDOMNSElement.getBoundingClientRect', # 'nsIDOMNSElement.getBoundingClientRect',
'nsIDOMNSElement.getElementsByClassName', # 'nsIDOMNSElement.getElementsByClassName',
'nsIDOMNSElement.scrollWidth', # 'nsIDOMNSElement.scrollWidth',
'nsIDOMNSElement.clientLeft', # 'nsIDOMNSElement.clientLeft',
'nsIDOMNSElement.clientHeight', # 'nsIDOMNSElement.clientHeight',
'nsIDOMNSElement.clientWidth', # 'nsIDOMNSElement.clientWidth',
'nsIDOMNSElement.clientTop', # 'nsIDOMNSElement.clientTop',
'nsIDOMNSElement.mozMatchesSelector', # 'nsIDOMNSElement.mozMatchesSelector',
#
# dom/interfaces/css # # dom/interfaces/css
'nsIDOMElementCSSInlineStyle.*', # 'nsIDOMElementCSSInlineStyle.*',
'nsIDOMCSS2Properties.*', # 'nsIDOMCSS2Properties.*',
'nsIDOMNSCSS2Properties.*', # 'nsIDOMNSCSS2Properties.*',
'nsIDOMRect.*', # 'nsIDOMRect.*',
'nsIDOMViewCSS.getComputedStyle', # 'nsIDOMViewCSS.getComputedStyle',
#
# dom/interfaces/events # # dom/interfaces/events
'nsIDOMEventTarget.dispatchEvent', # 'nsIDOMEventTarget.dispatchEvent',
'nsIDOMEventTarget.removeEventListener', # 'nsIDOMEventTarget.removeEventListener',
'nsIDOMNSEventTarget.addEventListener', # 'nsIDOMNSEventTarget.addEventListener',
'nsIDOMDocumentEvent.*', # 'nsIDOMDocumentEvent.*',
#
'nsIDOMEvent.*', # 'nsIDOMEvent.*',
'nsIDOMMouseEvent.*', # 'nsIDOMMouseEvent.*',
'nsIDOMKeyEvent.*', # 'nsIDOMKeyEvent.*',
'nsIDOMMutationEvent.*', # 'nsIDOMMutationEvent.*',
'nsIDOMDragEvent.*', # 'nsIDOMDragEvent.*',
'nsIDOMScrollAreaEvent.*', # 'nsIDOMScrollAreaEvent.*',
'nsIDOMNotifyPaintEvent.*', # 'nsIDOMNotifyPaintEvent.*',
'nsIDOMMessageEvent.*', # 'nsIDOMMessageEvent.*',
'nsIDOMMouseScrollEvent.*', # 'nsIDOMMouseScrollEvent.*',
'nsIDOMProgressEvent.lengthComputable', # 'nsIDOMProgressEvent.lengthComputable',
'nsIDOMProgressEvent.loaded', # 'nsIDOMProgressEvent.loaded',
'nsIDOMProgressEvent.total', # 'nsIDOMProgressEvent.total',
#XXX Can't quickstub initProgressEvent because it has long long parameters. # #XXX Can't quickstub initProgressEvent because it has long long parameters.
'nsIDOMNSEvent.originalTarget', # 'nsIDOMNSEvent.originalTarget',
'nsIDOMNSEvent.getPreventDefault', # 'nsIDOMNSEvent.getPreventDefault',
'nsIDOMNSUIEvent.which', # 'nsIDOMNSUIEvent.which',
'nsIDOMNSUIEvent.rangeParent', # 'nsIDOMNSUIEvent.rangeParent',
'nsIDOMNSUIEvent.rangeOffset', # 'nsIDOMNSUIEvent.rangeOffset',
'nsIDOMNSUIEvent.pageX', # 'nsIDOMNSUIEvent.pageX',
'nsIDOMNSUIEvent.pageY', # 'nsIDOMNSUIEvent.pageY',
'nsIDOMNSUIEvent.isChar', # 'nsIDOMNSUIEvent.isChar',
#
# dom/interfaces/geolocation - None. # # dom/interfaces/geolocation - None.
#
# dom/interfaces/html # # dom/interfaces/html
'nsIDOMHTMLAnchorElement.href', # 'nsIDOMHTMLAnchorElement.href',
'nsIDOMHTMLAnchorElement.rel', # 'nsIDOMHTMLAnchorElement.rel',
'nsIDOMHTMLAnchorElement.target', # 'nsIDOMHTMLAnchorElement.target',
'nsIDOMHTMLAnchorElement.name', # 'nsIDOMHTMLAnchorElement.name',
'nsIDOMHTMLBaseElement.href', # 'nsIDOMHTMLBaseElement.href',
'nsIDOMHTMLBaseElement.target', # 'nsIDOMHTMLBaseElement.target',
'nsIDOMHTMLButtonElement.name', # 'nsIDOMHTMLButtonElement.name',
'nsIDOMHTMLButtonElement.form', # 'nsIDOMHTMLButtonElement.form',
'nsIDOMHTMLButtonElement.value', # 'nsIDOMHTMLButtonElement.value',
'nsIDOMHTMLButtonElement.disabled', # 'nsIDOMHTMLButtonElement.disabled',
'nsIDOMHTMLCollection.item', # 'nsIDOMHTMLCollection.item',
# This is shadowed by nsIDOMHTMLOptionsCollection.length, # # This is shadowed by nsIDOMHTMLOptionsCollection.length,
# but it is also present in other objects where it isn't shadowed. # # but it is also present in other objects where it isn't shadowed.
# Quick stubs handle the shadowing the same as XPConnect. # # Quick stubs handle the shadowing the same as XPConnect.
'nsIDOMHTMLCollection.length', # 'nsIDOMHTMLCollection.length',
'nsIDOMHTMLDocument.body', # 'nsIDOMHTMLDocument.body',
'nsIDOMHTMLDocument.getElementsByName', # 'nsIDOMHTMLDocument.getElementsByName',
'nsIDOMHTMLDocument.anchors', # 'nsIDOMHTMLDocument.anchors',
'nsIDOMHTMLDocument.links', # 'nsIDOMHTMLDocument.links',
'nsIDOMHTMLDocument.title', # 'nsIDOMHTMLDocument.title',
'nsIDOMHTMLDocument.URL', # 'nsIDOMHTMLDocument.URL',
'nsIDOMHTMLDocument.referrer', # 'nsIDOMHTMLDocument.referrer',
'nsIDOMHTMLDocument.forms', # 'nsIDOMHTMLDocument.forms',
'nsIDOMHTMLDocument.cookie', # 'nsIDOMHTMLDocument.cookie',
'nsIDOMHTMLDocument.images', # 'nsIDOMHTMLDocument.images',
'nsIDOMHTMLDocument.write', # 'nsIDOMHTMLDocument.write',
'nsIDOMHTMLDocument.writeln', # 'nsIDOMHTMLDocument.writeln',
'nsIDOMHTMLElement.className', # 'nsIDOMHTMLElement.className',
'nsIDOMHTMLElement.id', # 'nsIDOMHTMLElement.id',
'nsIDOMHTMLElement.title', # 'nsIDOMHTMLElement.title',
'nsIDOMHTMLFormElement.elements', # 'nsIDOMHTMLFormElement.elements',
'nsIDOMHTMLFormElement.name', # 'nsIDOMHTMLFormElement.name',
'nsIDOMHTMLFormElement.submit', # 'nsIDOMHTMLFormElement.submit',
'nsIDOMHTMLFormElement.length', # 'nsIDOMHTMLFormElement.length',
'nsIDOMHTMLFormElement.target', # 'nsIDOMHTMLFormElement.target',
'nsIDOMHTMLFormElement.action', # 'nsIDOMHTMLFormElement.action',
'nsIDOMHTMLFrameElement.src', # 'nsIDOMHTMLFrameElement.src',
'nsIDOMHTMLFrameElement.contentDocument', # 'nsIDOMHTMLFrameElement.contentDocument',
'nsIDOMHTMLFrameElement.name', # 'nsIDOMHTMLFrameElement.name',
'nsIDOMHTMLFrameSetElement.rows', # 'nsIDOMHTMLFrameSetElement.rows',
'nsIDOMHTMLFrameSetElement.cols', # 'nsIDOMHTMLFrameSetElement.cols',
'nsIDOMHTMLIFrameElement.src', # 'nsIDOMHTMLIFrameElement.src',
'nsIDOMHTMLIFrameElement.contentDocument', # 'nsIDOMHTMLIFrameElement.contentDocument',
'nsIDOMHTMLImageElement.src', # 'nsIDOMHTMLImageElement.src',
'nsIDOMHTMLImageElement.name', # 'nsIDOMHTMLImageElement.name',
'nsIDOMHTMLImageElement.height', # 'nsIDOMHTMLImageElement.height',
'nsIDOMHTMLImageElement.width', # 'nsIDOMHTMLImageElement.width',
'nsIDOMHTMLInputElement.defaultChecked', # 'nsIDOMHTMLInputElement.defaultChecked',
'nsIDOMHTMLInputElement.disabled', # 'nsIDOMHTMLInputElement.disabled',
'nsIDOMHTMLInputElement.select', # 'nsIDOMHTMLInputElement.select',
'nsIDOMHTMLInputElement.checked', # 'nsIDOMHTMLInputElement.checked',
'nsIDOMHTMLInputElement.type', # 'nsIDOMHTMLInputElement.type',
'nsIDOMHTMLInputElement.form', # 'nsIDOMHTMLInputElement.form',
'nsIDOMHTMLInputElement.src', # 'nsIDOMHTMLInputElement.src',
'nsIDOMHTMLInputElement.name', # 'nsIDOMHTMLInputElement.name',
'nsIDOMHTMLInputElement.value', # 'nsIDOMHTMLInputElement.value',
'nsIDOMHTMLLinkElement.disabled', # 'nsIDOMHTMLLinkElement.disabled',
'nsIDOMHTMLOptionElement.index', # 'nsIDOMHTMLOptionElement.index',
'nsIDOMHTMLOptionElement.selected', # 'nsIDOMHTMLOptionElement.selected',
'nsIDOMHTMLOptionElement.form', # 'nsIDOMHTMLOptionElement.form',
# Readonly, shadowed by nsIDOMNSHTMLOptionElement.text (below). # # Readonly, shadowed by nsIDOMNSHTMLOptionElement.text (below).
#'nsIDOMHTMLOptionElement.text', # #'nsIDOMHTMLOptionElement.text',
'nsIDOMHTMLOptionElement.defaultSelected', # 'nsIDOMHTMLOptionElement.defaultSelected',
'nsIDOMHTMLOptionElement.value', # 'nsIDOMHTMLOptionElement.value',
'nsIDOMHTMLOptionElement.label', # 'nsIDOMHTMLOptionElement.label',
'nsIDOMHTMLOptionElement.disabled', # 'nsIDOMHTMLOptionElement.disabled',
'nsIDOMHTMLOptionsCollection.item', # 'nsIDOMHTMLOptionsCollection.item',
'nsIDOMHTMLOptionsCollection.length', # 'nsIDOMHTMLOptionsCollection.length',
'nsIDOMHTMLSelectElement.name', # 'nsIDOMHTMLSelectElement.name',
'nsIDOMHTMLSelectElement.form', # 'nsIDOMHTMLSelectElement.form',
'nsIDOMHTMLSelectElement.add', # 'nsIDOMHTMLSelectElement.add',
'nsIDOMHTMLSelectElement.value', # 'nsIDOMHTMLSelectElement.value',
'nsIDOMHTMLSelectElement.disabled', # 'nsIDOMHTMLSelectElement.disabled',
'nsIDOMHTMLSelectElement.length', # 'nsIDOMHTMLSelectElement.length',
'nsIDOMHTMLSelectElement.remove', # 'nsIDOMHTMLSelectElement.remove',
'nsIDOMHTMLSelectElement.selectedIndex', # 'nsIDOMHTMLSelectElement.selectedIndex',
'nsIDOMHTMLSelectElement.type', # 'nsIDOMHTMLSelectElement.type',
'nsIDOMHTMLSelectElement.options', # 'nsIDOMHTMLSelectElement.options',
'nsIDOMHTMLSelectElement.size', # 'nsIDOMHTMLSelectElement.size',
'nsIDOMHTMLStyleElement.disabled', # 'nsIDOMHTMLStyleElement.disabled',
'nsIDOMHTMLTableCellElement.colSpan', # 'nsIDOMHTMLTableCellElement.colSpan',
'nsIDOMHTMLTableCellElement.headers', # 'nsIDOMHTMLTableCellElement.headers',
'nsIDOMHTMLTableCellElement.cellIndex', # 'nsIDOMHTMLTableCellElement.cellIndex',
'nsIDOMHTMLTableCellElement.rowSpan', # 'nsIDOMHTMLTableCellElement.rowSpan',
'nsIDOMHTMLTableCellElement.abbr', # 'nsIDOMHTMLTableCellElement.abbr',
'nsIDOMHTMLTableCellElement.scope', # 'nsIDOMHTMLTableCellElement.scope',
'nsIDOMHTMLTableCellElement.noWrap', # 'nsIDOMHTMLTableCellElement.noWrap',
'nsIDOMHTMLTableCellElement.width', # 'nsIDOMHTMLTableCellElement.width',
'nsIDOMHTMLTableColElement.span', # 'nsIDOMHTMLTableColElement.span',
'nsIDOMHTMLTableColElement.width', # 'nsIDOMHTMLTableColElement.width',
'nsIDOMHTMLTableElement.rows', # 'nsIDOMHTMLTableElement.rows',
'nsIDOMHTMLTableElement.deleteRow', # 'nsIDOMHTMLTableElement.deleteRow',
'nsIDOMHTMLTableElement.summary', # 'nsIDOMHTMLTableElement.summary',
'nsIDOMHTMLTableElement.insertRow', # 'nsIDOMHTMLTableElement.insertRow',
'nsIDOMHTMLTableRowElement.sectionRowIndex', # 'nsIDOMHTMLTableRowElement.sectionRowIndex',
'nsIDOMHTMLTableRowElement.rowIndex', # 'nsIDOMHTMLTableRowElement.rowIndex',
'nsIDOMHTMLTableRowElement.cells', # 'nsIDOMHTMLTableRowElement.cells',
'nsIDOMHTMLTableRowElement.deleteCell', # 'nsIDOMHTMLTableRowElement.deleteCell',
'nsIDOMHTMLTableRowElement.insertCell', # 'nsIDOMHTMLTableRowElement.insertCell',
'nsIDOMHTMLTableSectionElement.rows', # 'nsIDOMHTMLTableSectionElement.rows',
'nsIDOMHTMLTableSectionElement.insertRow', # 'nsIDOMHTMLTableSectionElement.insertRow',
'nsIDOMHTMLTableSectionElement.deleteRow', # 'nsIDOMHTMLTableSectionElement.deleteRow',
'nsIDOMHTMLTextAreaElement.rows', # 'nsIDOMHTMLTextAreaElement.rows',
'nsIDOMHTMLTextAreaElement.name', # 'nsIDOMHTMLTextAreaElement.name',
'nsIDOMHTMLTextAreaElement.form', # 'nsIDOMHTMLTextAreaElement.form',
'nsIDOMHTMLTextAreaElement.defaultValue', # 'nsIDOMHTMLTextAreaElement.defaultValue',
'nsIDOMHTMLTextAreaElement.cols', # 'nsIDOMHTMLTextAreaElement.cols',
'nsIDOMHTMLTextAreaElement.value', # 'nsIDOMHTMLTextAreaElement.value',
'nsIDOMHTMLTextAreaElement.type', # 'nsIDOMHTMLTextAreaElement.type',
'nsIDOMHTMLTextAreaElement.select', # 'nsIDOMHTMLTextAreaElement.select',
'nsIDOMHTMLTitleElement.text', # 'nsIDOMHTMLTitleElement.text',
'nsIDOMHTMLCanvasElement.width', # 'nsIDOMHTMLCanvasElement.width',
'nsIDOMHTMLCanvasElement.height', # 'nsIDOMHTMLCanvasElement.height',
'nsIDOMHTMLCanvasElement.getContext', # 'nsIDOMHTMLCanvasElement.getContext',
'nsIDOMHTMLCanvasElement.toDataURL', # 'nsIDOMHTMLCanvasElement.toDataURL',
'nsIDOMNSHTMLAnchorElement.text', # 'nsIDOMNSHTMLAnchorElement.text',
'nsIDOMNSHTMLAnchorElement.search', # 'nsIDOMNSHTMLAnchorElement.search',
'nsIDOMNSHTMLAnchorElement.hash', # 'nsIDOMNSHTMLAnchorElement.hash',
'nsIDOMNSHTMLDocument.width', # 'nsIDOMNSHTMLDocument.width',
'nsIDOMNSHTMLDocument.height', # 'nsIDOMNSHTMLDocument.height',
'nsIDOMNSHTMLDocument.domain', # 'nsIDOMNSHTMLDocument.domain',
'nsIDOMNSHTMLDocument.getSelection', # 'nsIDOMNSHTMLDocument.getSelection',
'nsIDOMNSHTMLDocument.designMode', # 'nsIDOMNSHTMLDocument.designMode',
'nsIDOMNSHTMLElement.contentEditable', # 'nsIDOMNSHTMLElement.contentEditable',
'nsIDOMNSHTMLElement.isContentEditable', # 'nsIDOMNSHTMLElement.isContentEditable',
'nsIDOMNSHTMLElement.offsetParent', # 'nsIDOMNSHTMLElement.offsetParent',
'nsIDOMNSHTMLElement.innerHTML', # 'nsIDOMNSHTMLElement.innerHTML',
'nsIDOMNSHTMLElement.offsetLeft', # 'nsIDOMNSHTMLElement.offsetLeft',
'nsIDOMNSHTMLElement.offsetTop', # 'nsIDOMNSHTMLElement.offsetTop',
'nsIDOMNSHTMLElement.offsetHeight', # 'nsIDOMNSHTMLElement.offsetHeight',
'nsIDOMNSHTMLElement.offsetWidth', # 'nsIDOMNSHTMLElement.offsetWidth',
'nsIDOMNSHTMLElement.scrollIntoView', # 'nsIDOMNSHTMLElement.scrollIntoView',
'nsIDOMNSHTMLFrameElement.contentWindow', # 'nsIDOMNSHTMLFrameElement.contentWindow',
'nsIDOMNSHTMLImageElement.complete', # 'nsIDOMNSHTMLImageElement.complete',
'nsIDOMNSHTMLInputElement.files', # 'nsIDOMNSHTMLInputElement.files',
'nsIDOMNSHTMLInputElement.textLength', # 'nsIDOMNSHTMLInputElement.textLength',
'nsIDOMNSHTMLInputElement.selectionStart', # 'nsIDOMNSHTMLInputElement.selectionStart',
'nsIDOMNSHTMLInputElement.selectionEnd', # 'nsIDOMNSHTMLInputElement.selectionEnd',
'nsIDOMNSHTMLInputElement.setSelectionRange', # 'nsIDOMNSHTMLInputElement.setSelectionRange',
'nsIDOMNSHTMLOptionCollection.selectedIndex', # 'nsIDOMNSHTMLOptionCollection.selectedIndex',
'nsIDOMNSHTMLOptionCollection.add', # 'nsIDOMNSHTMLOptionCollection.add',
'nsIDOMNSHTMLOptionElement.text', # 'nsIDOMNSHTMLOptionElement.text',
'nsIDOMNSHTMLSelectElement.item', # 'nsIDOMNSHTMLSelectElement.item',
'nsIDOMNSHTMLTextAreaElement.setSelectionRange', # 'nsIDOMNSHTMLTextAreaElement.setSelectionRange',
'nsIDOMNSHTMLTextAreaElement.selectionStart', # 'nsIDOMNSHTMLTextAreaElement.selectionStart',
'nsIDOMNSHTMLTextAreaElement.selectionEnd', # 'nsIDOMNSHTMLTextAreaElement.selectionEnd',
'nsIDOMNSHTMLTextAreaElement.textLength', # 'nsIDOMNSHTMLTextAreaElement.textLength',
'nsIDOMNSHTMLTextAreaElement.wrap', # 'nsIDOMNSHTMLTextAreaElement.wrap',
#
# dom/interfaces/json - None. # # dom/interfaces/json - None.
# All 4 methods of nsIJSON call GetCurrentNativeCallContext. # # All 4 methods of nsIJSON call GetCurrentNativeCallContext.
#
# dom/interfaces/load-save - None. # # dom/interfaces/load-save - None.
#
# dom/interfaces/offline - None. # # dom/interfaces/offline - None.
#
# dom/interfaces/range # # dom/interfaces/range
'nsIDOMRange.*', # 'nsIDOMRange.*',
#
# dom/interfaces/sidebar - None. # # dom/interfaces/sidebar - None.
#
# dom/interfaces/smil - None. # # dom/interfaces/smil - None.
#
# dom/interfaces/storage # # dom/interfaces/storage
'nsIDOMToString.toString', # 'nsIDOMToString.toString',
'nsIDOMStorage.setItem', # 'nsIDOMStorage.setItem',
'nsIDOMStorage.length', # 'nsIDOMStorage.length',
'nsIDOMStorage.getItem', # 'nsIDOMStorage.getItem',
'nsIDOMStorage.key', # 'nsIDOMStorage.key',
'nsIDOMStorage.removeItem', # 'nsIDOMStorage.removeItem',
'nsIDOMStorage.clear', # 'nsIDOMStorage.clear',
'nsIDOMStorageItem.value', # 'nsIDOMStorageItem.value',
'nsIDOMStorageWindow.*', # 'nsIDOMStorageWindow.*',
#
# dom/interfaces/stylesheets - None. # # dom/interfaces/stylesheets - None.
#
# dom/interfaces/svg - None. # # dom/interfaces/svg - None.
#
# dom/interfaces/threads - None. # # dom/interfaces/threads - None.
#
# dom/interfaces/traversal # # dom/interfaces/traversal
'nsIDOMDocumentTraversal.createNodeIterator', # 'nsIDOMDocumentTraversal.createNodeIterator',
'nsIDOMNodeIterator.nextNode', # 'nsIDOMNodeIterator.nextNode',
#
# dom/interfaces/views # # dom/interfaces/views
'nsIDOMDocumentView.defaultView', # 'nsIDOMDocumentView.defaultView',
#
# dom/interfaces/xbl - None. # # dom/interfaces/xbl - None.
#
# dom/interfaces/xpath # # dom/interfaces/xpath
'nsIDOMXPathEvaluator.evaluate', # 'nsIDOMXPathEvaluator.evaluate',
'nsIDOMXPathEvaluator.createExpression', # 'nsIDOMXPathEvaluator.createExpression',
'nsIDOMXPathEvaluator.createNSResolver', # 'nsIDOMXPathEvaluator.createNSResolver',
'nsIDOMXPathExpression.evaluate', # 'nsIDOMXPathExpression.evaluate',
'nsIDOMXPathNSResolver.lookupNamespaceURI', # 'nsIDOMXPathNSResolver.lookupNamespaceURI',
'nsIDOMXPathResult.snapshotItem', # 'nsIDOMXPathResult.snapshotItem',
'nsIDOMXPathResult.iterateNext', # 'nsIDOMXPathResult.iterateNext',
'nsIDOMXPathResult.snapshotLength', # 'nsIDOMXPathResult.snapshotLength',
'nsIDOMXPathResult.resultType', # 'nsIDOMXPathResult.resultType',
'nsIDOMXPathResult.numberValue', # 'nsIDOMXPathResult.numberValue',
'nsIDOMXPathResult.stringValue', # 'nsIDOMXPathResult.stringValue',
'nsIDOMXPathResult.booleanValue', # 'nsIDOMXPathResult.booleanValue',
'nsIDOMXPathResult.singleNodeValue', # 'nsIDOMXPathResult.singleNodeValue',
'nsIDOMNSXPathExpression.evaluateWithContext', # 'nsIDOMNSXPathExpression.evaluateWithContext',
#
# dom/interfaces/xul - None. # # dom/interfaces/xul - None.
#
# XHR # # XHR
'nsIXMLHttpRequest.*', # 'nsIXMLHttpRequest.*',
# nsIXMLHttpRequest.channel is not used on the web, and more # # nsIXMLHttpRequest.channel is not used on the web, and more
# importantly relies on the CAPS check that quickstubs don't make. # # importantly relies on the CAPS check that quickstubs don't make.
'-nsIXMLHttpRequest.channel', # '-nsIXMLHttpRequest.channel',
# nsIXMLHttpRequest.open uses the JS stack # # nsIXMLHttpRequest.open uses the JS stack
'-nsIXMLHttpRequest.open', # '-nsIXMLHttpRequest.open',
# various XHR things use ACString and AUTF8String and [cstring] # # various XHR things use ACString and AUTF8String and [cstring]
# which quickstubs don't handle as return values (or at all in the # # which quickstubs don't handle as return values (or at all in the
# case of AUTF8String) yet. # # case of AUTF8String) yet.
'-nsIXMLHttpRequest.statusText', # '-nsIXMLHttpRequest.statusText',
'-nsIXMLHttpRequest.getAllResponseHeaders', # '-nsIXMLHttpRequest.getAllResponseHeaders',
'-nsIXMLHttpRequest.getResponseHeader', # '-nsIXMLHttpRequest.getResponseHeader',
'-nsIXMLHttpRequest.setRequestHeader', # '-nsIXMLHttpRequest.setRequestHeader',
'-nsIXMLHttpRequest.overrideMimeType', # '-nsIXMLHttpRequest.overrideMimeType',
# nsIXMLHttpRequestUpload doesn't live in its own IDL file, so # # nsIXMLHttpRequestUpload doesn't live in its own IDL file, so
# can't be quickstubbed # # can't be quickstubbed
'-nsIXMLHttpRequest.upload', # '-nsIXMLHttpRequest.upload',
#
# webgl # # webgl
'nsICanvasRenderingContextWebGL.*', # 'nsICanvasRenderingContextWebGL.*',
# These all use GetCurrentNativeCallContext and should be # # These all use GetCurrentNativeCallContext and should be
# custom-quickstubbed. # # custom-quickstubbed.
'-nsICanvasRenderingContextWebGL.getActiveAttrib', # '-nsICanvasRenderingContextWebGL.getActiveAttrib',
'-nsICanvasRenderingContextWebGL.getActiveUniform', # '-nsICanvasRenderingContextWebGL.getActiveUniform',
'-nsICanvasRenderingContextWebGL.getParameter', # '-nsICanvasRenderingContextWebGL.getParameter',
'-nsICanvasRenderingContextWebGL.getBufferParameter', # '-nsICanvasRenderingContextWebGL.getBufferParameter',
'-nsICanvasRenderingContextWebGL.getFramebufferAttachmentParameter', # '-nsICanvasRenderingContextWebGL.getFramebufferAttachmentParameter',
'-nsICanvasRenderingContextWebGL.getRenderbufferParameter', # '-nsICanvasRenderingContextWebGL.getRenderbufferParameter',
'-nsICanvasRenderingContextWebGL.getProgramParameter', # '-nsICanvasRenderingContextWebGL.getProgramParameter',
'-nsICanvasRenderingContextWebGL.texParameterf', # '-nsICanvasRenderingContextWebGL.texParameterf',
'-nsICanvasRenderingContextWebGL.texParameteri', # '-nsICanvasRenderingContextWebGL.texParameteri',
'-nsICanvasRenderingContextWebGL.getUniform', # '-nsICanvasRenderingContextWebGL.getUniform',
'-nsICanvasRenderingContextWebGL.getVertexAttrib', # '-nsICanvasRenderingContextWebGL.getVertexAttrib',
'-nsICanvasRenderingContextWebGL.getShaderParameter', # '-nsICanvasRenderingContextWebGL.getShaderParameter',
#
# dom/indexedDB # # dom/indexedDB
'nsIIDBCursor.*', # 'nsIIDBCursor.*',
'nsIIDBDatabase.*', # 'nsIIDBDatabase.*',
'nsIIDBDatabaseException.*', # 'nsIIDBDatabaseException.*',
'nsIIDBEvent.*', # 'nsIIDBEvent.*',
'nsIIDBErrorEvent.*', # 'nsIIDBErrorEvent.*',
'nsIIDBIndex.*', # 'nsIIDBIndex.*',
'nsIIDBKeyRange.*', # 'nsIIDBKeyRange.*',
'nsIIDBObjectStore.*', # 'nsIIDBObjectStore.*',
'nsIIDBRequest.*', # 'nsIIDBRequest.*',
'nsIIDBSuccessEvent.*', # 'nsIIDBSuccessEvent.*',
'nsIIDBTransaction.*', # 'nsIIDBTransaction.*',
'nsIIDBTransactionEvent.*', # 'nsIIDBTransactionEvent.*',
'nsIIDBFactory.*', # 'nsIIDBFactory.*',
] ]
# Most interfaces can be found by searching the includePath; to find # Most interfaces can be found by searching the includePath; to find
@ -518,8 +518,8 @@ customIncludes = [
] ]
customQuickStubs = [ customQuickStubs = [
'CustomQS_WebGL.h', # 'CustomQS_WebGL.h',
'CustomQS_Canvas2D.h' # 'CustomQS_Canvas2D.h'
] ]
customReturnInterfaces = [ customReturnInterfaces = [

View File

@ -2519,7 +2519,7 @@ nsXPConnect::GetWrapperForObject(JSContext* aJSContext,
{ {
JSObject *possibleOuter = objectscope->GetGlobalJSObject(); JSObject *possibleOuter = objectscope->GetGlobalJSObject();
Innerize(aJSContext, &possibleOuter); OBJ_TO_INNER_OBJECT(aJSContext, possibleOuter);
if(!possibleOuter) if(!possibleOuter)
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;

View File

@ -560,7 +560,7 @@ def writeArgumentUnboxing(f, i, name, type, haveCcx, optional, rvdeclared,
f.write(" if (NS_FAILED(rv)) {\n") f.write(" if (NS_FAILED(rv)) {\n")
if isSetter: if isSetter:
f.write(" xpc_qsThrowBadSetterValue(" 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: elif haveCcx:
f.write(" xpc_qsThrowBadArgWithCcx(ccx, rv, %d);\n" % i) f.write(" xpc_qsThrowBadArgWithCcx(ccx, rv, %d);\n" % i)
else: else:
@ -747,7 +747,7 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False):
signature = "static JSBool\n" signature = "static JSBool\n"
if isAttr: if isAttr:
# JSPropertyOp signature. # 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: else:
# JSFastNative. # JSFastNative.
signature += "%s(JSContext *cx, uintN argc,%s jsval *vp)\n" signature += "%s(JSContext *cx, uintN argc,%s jsval *vp)\n"
@ -857,7 +857,7 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False):
pthisval = 'vp' pthisval = 'vp'
elif isSetter: elif isSetter:
f.write(" js::AutoValueRooter tvr(cx);\n") f.write(" js::AutoValueRooter tvr(cx);\n")
pthisval = 'tvr.addr()' pthisval = 'tvr.jsval_addr()'
else: else:
pthisval = '&vp[1]' # as above, ok to overwrite vp[1] pthisval = '&vp[1]' # as above, ok to overwrite vp[1]
@ -986,7 +986,7 @@ def writeQuickStub(f, customMethodCalls, member, stubName, isSetter=False):
if isGetter: if isGetter:
thisval = '*vp' thisval = '*vp'
else: else:
thisval = '*tvr.addr()' thisval = '*tvr.jsval_addr()'
f.write(" return xpc_qsThrowGetterSetterFailed(cx, rv, " + f.write(" return xpc_qsThrowGetterSetterFailed(cx, rv, " +
"JSVAL_TO_OBJECT(%s), id);\n" % thisval) "JSVAL_TO_OBJECT(%s), id);\n" % thisval)

View File

@ -76,10 +76,15 @@ AccessCheck::isPrivileged(JSCompartment *compartment)
void void
AccessCheck::deny(JSContext *cx, jsid id) AccessCheck::deny(JSContext *cx, jsid id)
{ {
if(id == JSVAL_VOID) { if(id == JSID_VOID) {
JS_ReportError(cx, "Permission denied to access object"); JS_ReportError(cx, "Permission denied to access object");
} else { } 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); JS_ReportError(cx, "Permission denied to access property '%hs'", str);
} }
} }

View File

@ -171,10 +171,10 @@ GetHallPass(JSContext *cx, JSObject *wrappedObject, jsid id, JSObject **hallpass
} }
static bool static bool
Filter(JSContext *cx, JSObject *wrappedObject, AutoValueVector &props) Filter(JSContext *cx, JSObject *wrappedObject, AutoIdVector &props)
{ {
JSObject *hallpass; JSObject *hallpass;
if(!GetHallPass(cx, wrappedObject, JSVAL_VOID, &hallpass)) if(!GetHallPass(cx, wrappedObject, JSID_VOID, &hallpass))
return false; return false;
if(!hallpass) if(!hallpass)
return true; return true;
@ -193,28 +193,28 @@ Filter(JSContext *cx, JSObject *wrappedObject, AutoValueVector &props)
} }
bool bool
ChromeWrapper::getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoValueVector &props) ChromeWrapper::getOwnPropertyNames(JSContext *cx, JSObject *wrapper, AutoIdVector &props)
{ {
return JSCrossCompartmentWrapper::getOwnPropertyNames(cx, wrapper, props) && return JSCrossCompartmentWrapper::getOwnPropertyNames(cx, wrapper, props) &&
Filter(cx, wrappedObject(wrapper), props); Filter(cx, wrappedObject(wrapper), props);
} }
bool bool
ChromeWrapper::enumerate(JSContext *cx, JSObject *wrapper, AutoValueVector &props) ChromeWrapper::enumerate(JSContext *cx, JSObject *wrapper, AutoIdVector &props)
{ {
return JSCrossCompartmentWrapper::enumerate(cx, wrapper, props) && return JSCrossCompartmentWrapper::enumerate(cx, wrapper, props) &&
Filter(cx, wrappedObject(wrapper), props); Filter(cx, wrappedObject(wrapper), props);
} }
bool bool
ChromeWrapper::enumerateOwn(JSContext *cx, JSObject *wrapper, AutoValueVector &props) ChromeWrapper::enumerateOwn(JSContext *cx, JSObject *wrapper, AutoIdVector &props)
{ {
return JSCrossCompartmentWrapper::enumerateOwn(cx, wrapper, props) && return JSCrossCompartmentWrapper::enumerateOwn(cx, wrapper, props) &&
Filter(cx, wrappedObject(wrapper), props); Filter(cx, wrappedObject(wrapper), props);
} }
bool 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 refuse to trigger the iterator hook across chrome wrappers because
// we don't know how to censor custom iterator objects. Instead we trigger // we don't know how to censor custom iterator objects. Instead we trigger

View File

@ -47,10 +47,10 @@ class ChromeWrapper : public JSCrossCompartmentWrapper {
ChromeWrapper(); ChromeWrapper();
virtual ~ChromeWrapper(); virtual ~ChromeWrapper();
virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, js::AutoValueVector &props); virtual bool getOwnPropertyNames(JSContext *cx, JSObject *wrapper, js::AutoIdVector &props);
virtual bool enumerate(JSContext *cx, JSObject *wrapper, js::AutoValueVector &props); virtual bool enumerate(JSContext *cx, JSObject *wrapper, js::AutoIdVector &props);
virtual bool enumerateOwn(JSContext *cx, JSObject *wrapper, js::AutoValueVector &props); virtual bool enumerateOwn(JSContext *cx, JSObject *wrapper, js::AutoIdVector &props);
virtual bool iterate(JSContext *cx, JSObject *proxy, uintN flags, jsval *vp); virtual bool iterate(JSContext *cx, JSObject *proxy, uintN flags, js::Value *vp);
virtual bool enter(JSContext *cx, JSObject *wrapper, jsid id, Mode mode); virtual bool enter(JSContext *cx, JSObject *wrapper, jsid id, Mode mode);

View File

@ -2799,7 +2799,7 @@ nsXPCComponents_Utils::LookupMethod()
if(NS_FAILED(rv)) if(NS_FAILED(rv))
return rv; return rv;
Innerize(cx, &obj); OBJ_TO_INNER_OBJECT(cx, obj);
if(!obj) if(!obj)
return NS_ERROR_XPC_BAD_CONVERT_JS; return NS_ERROR_XPC_BAD_CONVERT_JS;
@ -3246,7 +3246,7 @@ xpc_CreateSandboxObject(JSContext * cx, jsval * vp, nsISupports *prinOrSop)
JSPRINCIPALS_DROP(cx, jsPrincipals); JSPRINCIPALS_DROP(cx, jsPrincipals);
if (!sandbox) if (!sandbox)
return NS_ERROR_XPC_UNEXPECTED; return NS_ERROR_XPC_UNEXPECTED;
js::AutoValueRooter tvr(cx, sandbox); js::AutoObjectRooter tvr(cx, sandbox);
{ {
JSAutoCrossCompartmentCall ac; JSAutoCrossCompartmentCall ac;

View File

@ -1589,7 +1589,7 @@ class AutoExceptionRestorer
{ {
public: public:
AutoExceptionRestorer(JSContext *cx, jsval v) AutoExceptionRestorer(JSContext *cx, jsval v)
: mContext(cx), tvr(cx, js::Valueify(v)) : mContext(cx), tvr(cx, v)
{ {
JS_ClearPendingException(mContext); JS_ClearPendingException(mContext);
} }

View File

@ -2642,7 +2642,7 @@ public:
JSObject* GetWrapper() JSObject* GetWrapper()
{ {
return (JSObject *) (mWrapperWord & FLAG_MASK); return (JSObject *) (mWrapperWord & ~(PRWord)FLAG_MASK);
} }
void SetWrapper(JSObject *obj) void SetWrapper(JSObject *obj)
{ {
@ -2693,7 +2693,9 @@ private:
DOUBLE_WRAPPER = JS_BIT(1), DOUBLE_WRAPPER = JS_BIT(1),
NEEDS_XOW = JS_BIT(2), NEEDS_XOW = JS_BIT(2),
LAST_FLAG = NEEDS_XOW LAST_FLAG = NEEDS_XOW,
FLAG_MASK = 0x3
}; };
protected: protected:

View File

@ -858,7 +858,6 @@ XPCWrappedNative::XPCWrappedNative(already_AddRefed<nsISupports> aIdentity,
mScriptableInfo(nsnull), mScriptableInfo(nsnull),
mWrapperWord(0) mWrapperWord(0)
{ {
PR_STATIC_ASSERT(LAST_FLAG & JSVAL_TAGMASK);
mIdentity = aIdentity.get(); mIdentity = aIdentity.get();
NS_ASSERTION(mMaybeProto, "bad ctor param"); NS_ASSERTION(mMaybeProto, "bad ctor param");

View File

@ -1448,7 +1448,7 @@ XPC_WN_JSOp_ThisObject(JSContext *cx, JSObject *obj)
if(!XPCPerThreadData::IsMainThread(cx)) if(!XPCPerThreadData::IsMainThread(cx))
return obj; return obj;
Outerize(cx, &obj); OBJ_TO_OUTER_OBJECT(cx, obj);
if(!obj) if(!obj)
return nsnull; return nsnull;