зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1209933 - Make sure all parent runtime pointers are the topmost parent, r=billm.
This commit is contained in:
Родитель
a5f3043e0f
Коммит
3b509ae190
|
@ -668,11 +668,9 @@ JS_NewRuntime(uint32_t maxbytes, uint32_t maxNurseryBytes, JSRuntime* parentRunt
|
|||
MOZ_ASSERT(jsInitState == Running,
|
||||
"must call JS_Init prior to creating any JSRuntimes");
|
||||
|
||||
// Any parent runtime should be the topmost parent. This assert
|
||||
// isn't required for correctness, but ensuring that the parent
|
||||
// runtime is not destroyed before this one is more easily done
|
||||
// for the main runtime in the process.
|
||||
MOZ_ASSERT_IF(parentRuntime, !parentRuntime->parentRuntime);
|
||||
// Make sure that all parent runtimes are the topmost parent.
|
||||
while (parentRuntime && parentRuntime->parentRuntime)
|
||||
parentRuntime = parentRuntime->parentRuntime;
|
||||
|
||||
JSRuntime* rt = js_new<JSRuntime>(parentRuntime);
|
||||
if (!rt)
|
||||
|
|
Загрузка…
Ссылка в новой задаче