PTAL.
https://codereview.chromium.org/189463019/diff/1/include/v8.h
File include/v8.h (right):
https://codereview.chromium.org/189463019/diff/1/include/v8.h#newcode840
include/v8.h:840: V8_INLINE bool SetReturnValueFrom(const K& key,
On 2014/03/10 11:35:23, dcarney wrote:
just SetReturnValue
Done.
https://codereview.chromium.org/189463019/diff/1/include/v8.h#newcode840
include/v8.h:840: V8_INLINE bool SetReturnValueFrom(const K& key,
On 2014/03/10 11:35:23, dcarney wrote:
just SetReturnValue
Done.
https://codereview.chromium.org/189463019/diff/1/include/v8.h#newcode847
include/v8.h:847: GetIsolate()->SetReference(parent, persistent);
On 2014/03/10 11:35:23, dcarney wrote:
create a private function to take a raw pointer
Done.
That is, I'm reusing a private SetReference(..) overload.
https://codereview.chromium.org/189463019/diff/1/include/v8.h#newcode851
include/v8.h:851: UniquePersistent<V> Set(const K& key, Local<V> value)
{
On 2014/03/10 11:35:23, dcarney wrote:
this can't work, since the Set should 0 the unique, and if it didn't,
you'd be
duplicating the cell and returning something that will necessarily
destroy it
Not done.
(As discussed offline, the SetUnique returns a UniquePersistent of the
old value. That should be ok.)
https://codereview.chromium.org/189463019/diff/1/include/v8.h#newcode856
include/v8.h:856: UniquePersistent<V> SetWithConfig(const K& key,
Local<V> value,
On 2014/03/10 11:35:23, dcarney wrote:
same here, plus this is not a very generic api
Kinda done. I've changed this to take a UniquePersistent, so that the
caller can set the class id/independent themselves. THis method then
becomes an overload of Set w/ a UniquePersistent.
Honestly, I'm not entirely sure if this is what you meant; please let me
know if not.
https://codereview.chromium.org/189463019/diff/1/include/v8.h#newcode5855
include/v8.h:5855: returnValue.Set(Local<V>::New(isolate_,
FromVal(value)));
On 2014/03/10 11:35:23, dcarney wrote:
no new handle, just install it directly in return value
Done.
https://codereview.chromium.org/189463019/diff/1/include/v8.h#newcode5884
include/v8.h:5884: if (data.GetValue().IsEmpty()) { // Zombied handle.
On 2014/03/10 11:35:23, dcarney wrote:
remove this clause
Done.
https://codereview.chromium.org/189463019/diff/20001/include/v8.h
File include/v8.h (right):
https://codereview.chromium.org/189463019/diff/20001/include/v8.h#newcode853
include/v8.h:853: UniquePersistent<V> Set(const K& key,
UniquePersistent<V>& value) {
I'd like to ASSERT(!value.IsWeak()), since the code makes the assumption
it can SetWeak(..) on this value. How?
(Most parts of v8 seem to use ASSERT from src/checks.h, but I assume one
shouldn't include stuff from src/... here and thus export that header to
all v8 clients?)
https://codereview.chromium.org/189463019/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.