| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bindings/core/v8/V8IntersectionObserver.h" | 5 #include "bindings/core/v8/V8IntersectionObserver.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionMessages.h" | 7 #include "bindings/core/v8/ExceptionMessages.h" |
| 8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
| 9 #include "bindings/core/v8/V8Binding.h" | 9 #include "bindings/core/v8/V8Binding.h" |
| 10 #include "bindings/core/v8/V8DOMWrapper.h" | 10 #include "bindings/core/v8/V8DOMWrapper.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 if (exception_state.HadException()) | 47 if (exception_state.HadException()) |
| 48 return; | 48 return; |
| 49 | 49 |
| 50 IntersectionObserverCallback* callback = new V8IntersectionObserverCallback( | 50 IntersectionObserverCallback* callback = new V8IntersectionObserverCallback( |
| 51 v8::Local<v8::Function>::Cast(info[0]), wrapper, | 51 v8::Local<v8::Function>::Cast(info[0]), wrapper, |
| 52 ScriptState::Current(info.GetIsolate())); | 52 ScriptState::Current(info.GetIsolate())); |
| 53 IntersectionObserver* observer = IntersectionObserver::Create( | 53 IntersectionObserver* observer = IntersectionObserver::Create( |
| 54 intersection_observer_init, *callback, exception_state); | 54 intersection_observer_init, *callback, exception_state); |
| 55 if (exception_state.HadException()) | 55 if (exception_state.HadException()) |
| 56 return; | 56 return; |
| 57 ASSERT(observer); | 57 DCHECK(observer); |
| 58 V8SetReturnValue(info, | 58 V8SetReturnValue(info, |
| 59 V8DOMWrapper::AssociateObjectWithWrapper( | 59 V8DOMWrapper::AssociateObjectWithWrapper( |
| 60 info.GetIsolate(), observer, &wrapperTypeInfo, wrapper)); | 60 info.GetIsolate(), observer, &wrapperTypeInfo, wrapper)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace blink | 63 } // namespace blink |
| OLD | NEW |