зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
154ca8c80b
Коммит
11c263f4f6
|
@ -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());
|
||||
|
|
Загрузка…
Ссылка в новой задаче