зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1434305 - Part 1: Add LazyScript::{compartment,realm} which returns corresponding JSFunction's {compartment,realm}. r=jimb
This is a preparation for functions added in later parts, to handle LazyScript samely as JSScript in template function etc.
This commit is contained in:
Родитель
585bfee6dc
Коммит
09bde9007c
|
@ -4247,6 +4247,18 @@ LazyScript::initScript(JSScript* script)
|
|||
script_.set(script);
|
||||
}
|
||||
|
||||
JS::Compartment*
|
||||
LazyScript::compartment() const
|
||||
{
|
||||
return function_->compartment();
|
||||
}
|
||||
|
||||
Realm*
|
||||
LazyScript::realm() const
|
||||
{
|
||||
return function_->realm();
|
||||
}
|
||||
|
||||
void
|
||||
LazyScript::setEnclosingLazyScript(LazyScript* enclosingLazyScript)
|
||||
{
|
||||
|
|
|
@ -2346,6 +2346,9 @@ class LazyScript : public gc::TenuredCell
|
|||
return function_;
|
||||
}
|
||||
|
||||
JS::Compartment* compartment() const;
|
||||
Realm* realm() const;
|
||||
|
||||
void initScript(JSScript* script);
|
||||
|
||||
JSScript* maybeScript() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче