Status: Untriaged
Owner: ----
New issue 4103 by [email protected]: v8::Array::CloneElementAt returns
empty result on cloning
https://code.google.com/p/v8/issues/detail?id=4103
Version: 19a421c694d2aaa6314dd19d25b55de4507bb56d
OS: Linux (Ubuntu 14.04.2 LTS)
Architecture: x64
What steps will reproduce the problem?
1. Create v8::Local<v8::Array> and add at least one v8::Local<v8::Object>
to it.
2. Try to call v8::Array::CloneElementAt(context, index)
3. Check whether result IsEmpty().
What is the expected output?
Cloned v8::MaybeLocal<v8::Object> is not empty.
What do you see instead?
Cloned v8::MaybeLocal<v8::Object> is empty.
here is brief explanation:
v8::Local<v8::Array> local_array = v8::Array::New(isolate);
local_array->Set(context, 0, v8::Object::New(isolate).As<v8::Value>());
if (!local_array->Get(0)->IsObject()) {
printf("Try to clone something diffrent from object");
}
v8::MaybeLocal<v8::Object> maybe_local_object =
local_array->CloneElementAt(local_context, 0);
if (maybe_local_object.IsEmpty()) {
printf("Cloning failed\n");
return;
}
After tweaking Array::CloneElementAt source code from
has_pending_exception = ToLocal<Object>(
isolate->factory()->CopyJSObject(paragon_handle), &result);
to
ToLocal<Object>(
isolate->factory()->CopyJSObject(paragon_handle), &result);
(which is a dumb way actually)
cloning works without any visible side-effects.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
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.