| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 V8IteratorResultValue_h | 5 #ifndef V8IteratorResultValue_h |
| 6 #define V8IteratorResultValue_h | 6 #define V8IteratorResultValue_h |
| 7 | 7 |
| 8 #include <v8.h> |
| 8 #include "bindings/core/v8/ScriptValue.h" | 9 #include "bindings/core/v8/ScriptValue.h" |
| 9 #include "bindings/core/v8/ToV8.h" | 10 #include "bindings/core/v8/ToV8.h" |
| 10 #include "core/CoreExport.h" | 11 #include "core/CoreExport.h" |
| 11 #include <v8.h> | |
| 12 | 12 |
| 13 namespace blink { | 13 namespace blink { |
| 14 | 14 |
| 15 // "Iterator result" in this file is an object returned from iterator.next() | 15 // "Iterator result" in this file is an object returned from iterator.next() |
| 16 // having two members "done" and "value". | 16 // having two members "done" and "value". |
| 17 | 17 |
| 18 CORE_EXPORT v8::Local<v8::Object> v8IteratorResultValue(v8::Isolate*, | 18 CORE_EXPORT v8::Local<v8::Object> v8IteratorResultValue(v8::Isolate*, |
| 19 bool done, | 19 bool done, |
| 20 v8::Local<v8::Value>); | 20 v8::Local<v8::Value>); |
| 21 | 21 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 inline ScriptValue v8IteratorResultDone(ScriptState* scriptState) { | 36 inline ScriptValue v8IteratorResultDone(ScriptState* scriptState) { |
| 37 return ScriptValue(scriptState, v8IteratorResultValue( | 37 return ScriptValue(scriptState, v8IteratorResultValue( |
| 38 scriptState->isolate(), true, | 38 scriptState->isolate(), true, |
| 39 v8::Undefined(scriptState->isolate()))); | 39 v8::Undefined(scriptState->isolate()))); |
| 40 } | 40 } |
| 41 | 41 |
| 42 } // namespace blink | 42 } // namespace blink |
| 43 | 43 |
| 44 #endif // V8IteratorResultValue_h | 44 #endif // V8IteratorResultValue_h |
| OLD | NEW |