mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 747819. When wrapping non-prefable objects, don't generate a fallback-to-XPConnect codepath. r=peterv
This commit is contained in:
parent
e2ed0fe94a
commit
b12a3e7927
@ -1468,14 +1468,17 @@ def getWrapTemplateForTypeImpl(type, result, descriptorProvider,
|
||||
if (WrapNewBindingObject(cx, obj, %s, ${jsvalPtr})) {
|
||||
return true;
|
||||
}""" % result
|
||||
if descriptor.workers:
|
||||
# Worker bindings can only fail to wrap as a new-binding object
|
||||
# if they already threw an exception
|
||||
# We don't support prefable stuff in workers.
|
||||
assert(not descriptor.prefable or not descriptor.workers)
|
||||
if not descriptor.prefable:
|
||||
# Non-prefable bindings can only fail to wrap as a new-binding object
|
||||
# if they already threw an exception. Same thing for
|
||||
# non-prefable bindings.
|
||||
wrappingCode += """
|
||||
MOZ_ASSERT(JS_IsExceptionPending(cx));
|
||||
return false;"""
|
||||
else:
|
||||
# Try old-style wrapping for non-worker bindings
|
||||
# Try old-style wrapping for bindings which might be preffed off.
|
||||
wrappingCode += """
|
||||
return HandleNewBindingWrappingFailure(cx, obj, %s, ${jsvalPtr});""" % result
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user