mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +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
371def9626
commit
8ccc3897f4
@ -5848,7 +5848,9 @@ class CGProxyUnwrap(CGAbstractMethod):
|
||||
def declare(self):
|
||||
return ""
|
||||
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);
|
||||
}
|
||||
MOZ_ASSERT(IsProxy(obj));
|
||||
|
Loading…
Reference in New Issue
Block a user