mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-23 10:54:33 +00:00
Bug 795896. Speed up UnwrapProxy, since we know what we have there is either an Xray or our proxy. r=peterv
This commit is contained in:
parent
c378192382
commit
22e57505d0
@ -5848,7 +5848,9 @@ class CGProxyUnwrap(CGAbstractMethod):
|
|||||||
def declare(self):
|
def declare(self):
|
||||||
return ""
|
return ""
|
||||||
def definition_body(self):
|
def definition_body(self):
|
||||||
return """ if (xpc::WrapperFactory::IsXrayWrapper(obj)) {
|
return """ MOZ_ASSERT(js::IsProxy(obj));
|
||||||
|
if (js::GetProxyHandler(obj) != DOMProxyHandler::getInstance()) {
|
||||||
|
MOZ_ASSERT(xpc::WrapperFactory::IsXrayWrapper(obj));
|
||||||
obj = js::UnwrapObject(obj);
|
obj = js::UnwrapObject(obj);
|
||||||
}
|
}
|
||||||
MOZ_ASSERT(IsProxy(obj));
|
MOZ_ASSERT(IsProxy(obj));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user