mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1292892 part 4 - Pass RootingContext to ModuleEntry. r=bz
This commit is contained in:
parent
da9820d563
commit
4ec9b6fc7e
@ -373,7 +373,7 @@ mozJSComponentLoader::LoadModule(FileLocation& aFile)
|
||||
jsapi.Init();
|
||||
JSContext* cx = jsapi.cx();
|
||||
|
||||
nsAutoPtr<ModuleEntry> entry(new ModuleEntry(cx));
|
||||
nsAutoPtr<ModuleEntry> entry(new ModuleEntry(RootingContext::get(cx)));
|
||||
RootedValue dummy(cx);
|
||||
rv = ObjectForLocation(info, file, &entry->obj, &entry->thisObjectKey,
|
||||
&entry->location, false, &dummy);
|
||||
@ -1164,7 +1164,7 @@ mozJSComponentLoader::ImportInto(const nsACString& aLocation,
|
||||
ModuleEntry* mod;
|
||||
nsAutoPtr<ModuleEntry> newEntry;
|
||||
if (!mImports.Get(info.Key(), &mod) && !mInProgressImports.Get(info.Key(), &mod)) {
|
||||
newEntry = new ModuleEntry(callercx);
|
||||
newEntry = new ModuleEntry(RootingContext::get(callercx));
|
||||
if (!newEntry)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
mInProgressImports.Put(info.Key(), newEntry);
|
||||
|
@ -88,8 +88,8 @@ class mozJSComponentLoader : public mozilla::ModuleLoader,
|
||||
class ModuleEntry : public mozilla::Module
|
||||
{
|
||||
public:
|
||||
explicit ModuleEntry(JSContext* aCx)
|
||||
: mozilla::Module(), obj(aCx), thisObjectKey(aCx)
|
||||
explicit ModuleEntry(JS::RootingContext* aRootingCx)
|
||||
: mozilla::Module(), obj(aRootingCx), thisObjectKey(aRootingCx)
|
||||
{
|
||||
mVersion = mozilla::Module::kVersion;
|
||||
mCIDs = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user