Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv

The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
This commit is contained in:
Boris Zbarsky
2015-03-19 10:13:33 -04:00
parent ea881b3a53
commit 3a822d99b4
933 changed files with 1577 additions and 1572 deletions

View File

@@ -314,26 +314,26 @@ HTMLSharedElement::GetAttributeMappingFunction() const
}
JSObject*
HTMLSharedElement::WrapNode(JSContext *aCx)
HTMLSharedElement::WrapNode(JSContext *aCx, JS::Handle<JSObject*> aGivenProto)
{
if (mNodeInfo->Equals(nsGkAtoms::param)) {
return HTMLParamElementBinding::Wrap(aCx, this);
return HTMLParamElementBinding::Wrap(aCx, this, aGivenProto);
}
if (mNodeInfo->Equals(nsGkAtoms::base)) {
return HTMLBaseElementBinding::Wrap(aCx, this);
return HTMLBaseElementBinding::Wrap(aCx, this, aGivenProto);
}
if (mNodeInfo->Equals(nsGkAtoms::dir)) {
return HTMLDirectoryElementBinding::Wrap(aCx, this);
return HTMLDirectoryElementBinding::Wrap(aCx, this, aGivenProto);
}
if (mNodeInfo->Equals(nsGkAtoms::q) ||
mNodeInfo->Equals(nsGkAtoms::blockquote)) {
return HTMLQuoteElementBinding::Wrap(aCx, this);
return HTMLQuoteElementBinding::Wrap(aCx, this, aGivenProto);
}
if (mNodeInfo->Equals(nsGkAtoms::head)) {
return HTMLHeadElementBinding::Wrap(aCx, this);
return HTMLHeadElementBinding::Wrap(aCx, this, aGivenProto);
}
MOZ_ASSERT(mNodeInfo->Equals(nsGkAtoms::html));
return HTMLHtmlElementBinding::Wrap(aCx, this);
return HTMLHtmlElementBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace mozilla