| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef Iterable_h | 5 #ifndef Iterable_h |
| 6 #define Iterable_h | 6 #define Iterable_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/V8IteratorResultValue.h" | 8 #include "bindings/core/v8/V8IteratorResultValue.h" |
| 9 #include "bindings/core/v8/V8ScriptRunner.h" | 9 #include "bindings/core/v8/V8ScriptRunner.h" |
| 10 #include "core/dom/Iterator.h" | 10 #include "core/dom/Iterator.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 args[0] = toV8(value, creationContext, isolate); | 65 args[0] = toV8(value, creationContext, isolate); |
| 66 args[1] = toV8(key, creationContext, isolate); | 66 args[1] = toV8(key, creationContext, isolate); |
| 67 if (args[0].IsEmpty() || args[1].IsEmpty()) { | 67 if (args[0].IsEmpty() || args[1].IsEmpty()) { |
| 68 if (tryCatch.HasCaught()) | 68 if (tryCatch.HasCaught()) |
| 69 exceptionState.rethrowV8Exception(tryCatch.Exception()); | 69 exceptionState.rethrowV8Exception(tryCatch.Exception()); |
| 70 return; | 70 return; |
| 71 } | 71 } |
| 72 | 72 |
| 73 v8::Local<v8::Value> result; | 73 v8::Local<v8::Value> result; |
| 74 if (!V8ScriptRunner::callFunction(v8Callback, scriptState->execution
Context(), v8ThisArg, 3, args, isolate).ToLocal(&result)) { | 74 if (!V8ScriptRunner::callFunction(v8Callback, scriptState->getExecut
ionContext(), v8ThisArg, 3, args, isolate).ToLocal(&result)) { |
| 75 exceptionState.rethrowV8Exception(tryCatch.Exception()); | 75 exceptionState.rethrowV8Exception(tryCatch.Exception()); |
| 76 return; | 76 return; |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 } | 79 } |
| 80 | 80 |
| 81 class IterationSource : public GarbageCollectedFinalized<IterationSource> { | 81 class IterationSource : public GarbageCollectedFinalized<IterationSource> { |
| 82 public: | 82 public: |
| 83 virtual ~IterationSource() { } | 83 virtual ~IterationSource() { } |
| 84 | 84 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 public: | 199 public: |
| 200 Iterator* iterator(ScriptState* scriptState, ExceptionState& exceptionState) | 200 Iterator* iterator(ScriptState* scriptState, ExceptionState& exceptionState) |
| 201 { | 201 { |
| 202 return this->entriesForBinding(scriptState, exceptionState); | 202 return this->entriesForBinding(scriptState, exceptionState); |
| 203 } | 203 } |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 } // namespace blink | 206 } // namespace blink |
| 207 | 207 |
| 208 #endif // Iterable_h | 208 #endif // Iterable_h |
| OLD | NEW |