Bug 1063247: Allow implicit construction of JS::ubi::Node from JS::HandleValue. r=terrence

This seems reasonable, since a ubi::Node is really just a pointer with some
introspection support, so the value and the Node are pretty similar. And I don't
see cases where you'd want an error.
This commit is contained in:
Jim Blandy 2014-09-19 15:10:00 -07:00
Родитель 154ca8c80b
Коммит 11c263f4f6
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -271,7 +271,7 @@ class Node {
}
// Constructors accepting SpiderMonkey's other generic-pointer-ish types.
explicit Node(JS::Value value);
Node(JS::HandleValue value);
Node(JSGCTraceKind kind, void *ptr);
// copy construction and copy assignment just use memcpy, since we know

Просмотреть файл

@ -60,7 +60,7 @@ Node::Node(JSGCTraceKind kind, void *ptr)
}
}
Node::Node(Value value)
Node::Node(HandleValue value)
{
if (value.isObject())
construct(&value.toObject());