mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-04 13:07:52 +00: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
d5eb2be0cb
commit
a7342c18c3
@ -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…
x
Reference in New Issue
Block a user