| Index: third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp
|
| index a8a68c419962bb56a6c1050595e2170709776d0c..5653cc049bd41983835caf45ad90b1d6fde4e7c7 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8IntersectionObserverCustom.cpp
|
| @@ -16,25 +16,26 @@ namespace blink {
|
|
|
| void V8IntersectionObserver::constructorCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
|
| {
|
| + ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ConstructionContext, "IntersectionObserver");
|
| +
|
| if (UNLIKELY(info.Length() < 1)) {
|
| - V8ThrowException::throwException(info.GetIsolate(), createMinimumArityTypeErrorForMethod(info.GetIsolate(), "createIntersectionObserver", "Intersection", 1, info.Length()));
|
| + exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length()));
|
| return;
|
| }
|
|
|
| v8::Local<v8::Object> wrapper = info.Holder();
|
|
|
| if (!info[0]->IsFunction()) {
|
| - V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("createIntersectionObserver", "Intersection", "The callback provided as parameter 1 is not a function."));
|
| + exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
|
| return;
|
| }
|
|
|
| if (info.Length() > 1 && !isUndefinedOrNull(info[1]) && !info[1]->IsObject()) {
|
| - V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("createIntersectionObserver", "Intersection", "IntersectionObserverInit (parameter 2) is not an object."));
|
| + exceptionState.throwTypeError("parameter 2 ('options') is not an object.");
|
| return;
|
| }
|
|
|
| IntersectionObserverInit intersectionObserverInit;
|
| - ExceptionState exceptionState(ExceptionState::ConstructionContext, "Intersection", info.Holder(), info.GetIsolate());
|
| V8IntersectionObserverInit::toImpl(info.GetIsolate(), info[1], intersectionObserverInit, exceptionState);
|
| if (exceptionState.hadException())
|
| return;
|
|
|