mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 864727 part 3. Pass a handle for the parent object to WebIDL dictionary ToObject. r=ms2ger
This commit is contained in:
parent
2c5ce6945c
commit
1b68038a46
@ -3614,7 +3614,7 @@ if (%s.IsNull()) {
|
||||
innerTemplate = CGIndenter(CGGeneric(innerTemplate), 6).define()
|
||||
return (("""
|
||||
uint32_t length = %s.Length();
|
||||
JSObject *returnArray = JS_NewArrayObject(cx, length, NULL);
|
||||
JS::Rooted<JSObject*> returnArray(cx, JS_NewArrayObject(cx, length, nullptr));
|
||||
if (!returnArray) {
|
||||
%s
|
||||
}
|
||||
@ -7068,7 +7068,7 @@ class CGDictionary(CGThing):
|
||||
"struct ${selfName} ${inheritance}{\n"
|
||||
" ${selfName}() {}\n"
|
||||
" bool Init(JSContext* cx, const JS::Value& val);\n"
|
||||
" bool ToObject(JSContext* cx, JSObject* parentObject, JS::Value *vp);\n"
|
||||
" bool ToObject(JSContext* cx, JS::Handle<JSObject*> parentObject, JS::Value *vp);\n"
|
||||
"\n" +
|
||||
(" bool Init(const nsAString& aJSON)\n"
|
||||
" {\n"
|
||||
@ -7173,7 +7173,7 @@ class CGDictionary(CGThing):
|
||||
"}\n"
|
||||
"\n"
|
||||
"bool\n"
|
||||
"${selfName}::ToObject(JSContext* cx, JSObject* parentObject, JS::Value *vp)\n"
|
||||
"${selfName}::ToObject(JSContext* cx, JS::Handle<JSObject*> parentObject, JS::Value *vp)\n"
|
||||
"{\n" +
|
||||
# NOTE: jsids are per-runtime, so don't use them in workers
|
||||
(" if (!initedIds && !InitIds(cx)) {\n"
|
||||
|
@ -434,7 +434,7 @@ inDOMUtils::ColorNameToRGB(const nsAString& aColorName, JSContext* aCx,
|
||||
triple.mG = NS_GET_G(color);
|
||||
triple.mB = NS_GET_B(color);
|
||||
|
||||
if (!triple.ToObject(aCx, nullptr, aValue)) {
|
||||
if (!triple.ToObject(aCx, JS::NullPtr(), aValue)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ Dashboard::GetSockets()
|
||||
}
|
||||
|
||||
JS::Value val;
|
||||
if (!dict.ToObject(cx, nullptr, &val)) {
|
||||
if (!dict.ToObject(cx, JS::NullPtr(), &val)) {
|
||||
mSock.cb = nullptr;
|
||||
mSock.data.Clear();
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -198,7 +198,7 @@ Dashboard::GetHttpConnections()
|
||||
}
|
||||
|
||||
JS::Value val;
|
||||
if (!dict.ToObject(cx, nullptr, &val)) {
|
||||
if (!dict.ToObject(cx, JS::NullPtr(), &val)) {
|
||||
mHttp.cb = nullptr;
|
||||
mHttp.data.Clear();
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -338,7 +338,7 @@ Dashboard::GetWebSocketConnections()
|
||||
}
|
||||
|
||||
JS::Value val;
|
||||
if (!dict.ToObject(cx, nullptr, &val)) {
|
||||
if (!dict.ToObject(cx, JS::NullPtr(), &val)) {
|
||||
mWs.cb = nullptr;
|
||||
mWs.data.Clear();
|
||||
return NS_ERROR_FAILURE;
|
||||
@ -427,7 +427,7 @@ Dashboard::GetDNSCacheEntries()
|
||||
}
|
||||
|
||||
JS::Value val;
|
||||
if (!dict.ToObject(cx, nullptr, &val)) {
|
||||
if (!dict.ToObject(cx, JS::NullPtr(), &val)) {
|
||||
mDns.cb = nullptr;
|
||||
mDns.data.Clear();
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user