| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 553cf485d46090491ce302cbc4210856188fe3ca..203a6911f47736ba8bb8dfe965b670e389485200 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -5548,8 +5548,7 @@ void* v8::Object::SlowGetAlignedPointerFromInternalField(int index) {
|
| i::Handle<i::JSObject>::cast(obj)->GetInternalField(index), location);
|
| }
|
|
|
| -
|
| -void v8::Object::SetAlignedPointerInInternalField(int index, void* value) {
|
| +void v8::Object::SlowSetAlignedPointerInInternalField(int index, void* value) {
|
| i::Handle<i::JSReceiver> obj = Utils::OpenHandle(this);
|
| const char* location = "v8::Object::SetAlignedPointerInInternalField()";
|
| if (!InternalFieldOK(obj, index, location)) return;
|
| @@ -5558,6 +5557,24 @@ void v8::Object::SetAlignedPointerInInternalField(int index, void* value) {
|
| DCHECK_EQ(value, GetAlignedPointerFromInternalField(index));
|
| }
|
|
|
| +void v8::Object::SlowSetAlignedPointerInInternalFields(int argc, int indices[],
|
| + void* values[]) {
|
| + i::Handle<i::JSReceiver> obj = Utils::OpenHandle(this);
|
| + const char* location = "v8::Object::SetAlignedPointerInInternalFields()";
|
| + i::DisallowHeapAllocation no_gc;
|
| + i::JSObject* object = i::JSObject::cast(*obj);
|
| + int nof_internal_fields = object->GetInternalFieldCount();
|
| + for (int i = 0; i < argc; i++) {
|
| + int index = indices[i];
|
| + if (!Utils::ApiCheck(index < nof_internal_fields, location,
|
| + "Internal field out of bounds")) {
|
| + return;
|
| + }
|
| + void* value = values[i];
|
| + object->SetInternalField(index, EncodeAlignedAsSmi(value, location));
|
| + DCHECK_EQ(value, GetAlignedPointerFromInternalField(index));
|
| + }
|
| +}
|
|
|
| static void* ExternalValue(i::Object* obj) {
|
| // Obscure semantics for undefined, but somehow checked in our unit tests...
|
|
|