| Index: third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| diff --git a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| index 19531b0375fa3d77f1c49923cd3d17531d5b4fe2..ebd29b8dd8c2282c6e31a4582497869ef6fce91b 100644
|
| --- a/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| +++ b/third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
| @@ -366,7 +366,7 @@ void MainThreadDebugger::querySelectorAllCallback(const v8::FunctionCallbackInfo
|
| v8::Local<v8::Array> nodes = v8::Array::New(isolate, elementList->length());
|
| for (size_t i = 0; i < elementList->length(); ++i) {
|
| Element* element = elementList->item(i);
|
| - if (!nodes->Set(context, i, toV8(element, info.Holder(), info.GetIsolate())).FromMaybe(false))
|
| + if (!safeCreateDataPropertyInArray(context, nodes, i, toV8(element, info.Holder(), info.GetIsolate())).FromMaybe(false))
|
| return;
|
| }
|
| info.GetReturnValue().Set(nodes);
|
| @@ -401,7 +401,7 @@ void MainThreadDebugger::xpathSelectorCallback(const v8::FunctionCallbackInfo<v8
|
| while (Node* node = result->iterateNext(exceptionState)) {
|
| if (exceptionState.throwIfNeeded())
|
| return;
|
| - if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.GetIsolate())).FromMaybe(false))
|
| + if (!safeCreateDataPropertyInArray(context, nodes, index++, toV8(node, info.Holder(), info.GetIsolate())).FromMaybe(false))
|
| return;
|
| }
|
| info.GetReturnValue().Set(nodes);
|
|
|