mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1075564: Give JS::ubi::Node its implicit constructor back, with the right annotation this time. r=luke
This commit is contained in:
parent
5d3c893ed4
commit
eb0712728b
@ -274,7 +274,10 @@ class Node {
|
||||
}
|
||||
|
||||
// Constructors accepting SpiderMonkey's other generic-pointer-ish types.
|
||||
explicit Node(JS::HandleValue value);
|
||||
// Note that we *do* want an implicit constructor here: JS::Value and
|
||||
// JS::ubi::Node are both essentially tagged references to other sorts of
|
||||
// objects, so letting conversions happen automatically is appropriate.
|
||||
MOZ_IMPLICIT Node(JS::HandleValue value);
|
||||
Node(JSGCTraceKind kind, void *ptr);
|
||||
|
||||
// copy construction and copy assignment just use memcpy, since we know
|
||||
|
@ -2069,7 +2069,7 @@ ByteSize(JSContext *cx, unsigned argc, Value *vp)
|
||||
{
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
mozilla::MallocSizeOf mallocSizeOf = cx->runtime()->debuggerMallocSizeOf;
|
||||
JS::ubi::Node node(args.get(0));
|
||||
JS::ubi::Node node = args.get(0);
|
||||
if (node)
|
||||
args.rval().set(NumberValue(node.size(mallocSizeOf)));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user