| 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 ToV8_h | 5 #ifndef ToV8_h |
| 6 #define ToV8_h | 6 #define ToV8_h |
| 7 | 7 |
| 8 // toV8() provides C++ -> V8 conversion. Note that toV8() can return an empty | 8 // toV8() provides C++ -> V8 conversion. Note that toV8() can return an empty |
| 9 // handle. Call sites must check IsEmpty() before using return value. | 9 // handle. Call sites must check IsEmpty() before using return value. |
| 10 | 10 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 } | 238 } |
| 239 | 239 |
| 240 // Only declare toV8(void*,...) for checking function overload mismatch. | 240 // Only declare toV8(void*,...) for checking function overload mismatch. |
| 241 // This toV8(void*,...) should be never used. So we will find mismatch | 241 // This toV8(void*,...) should be never used. So we will find mismatch |
| 242 // because of "unresolved external symbol". | 242 // because of "unresolved external symbol". |
| 243 // Without toV8(void*, ...), call to toV8 with T* will match with | 243 // Without toV8(void*, ...), call to toV8 with T* will match with |
| 244 // toV8(bool, ...) if T is not a subclass of ScriptWrappable or if T is | 244 // toV8(bool, ...) if T is not a subclass of ScriptWrappable or if T is |
| 245 // declared but not defined (so it's not clear that T is a subclass of | 245 // declared but not defined (so it's not clear that T is a subclass of |
| 246 // ScriptWrappable). | 246 // ScriptWrappable). |
| 247 // This hack helps detect such unwanted implicit conversions from T* to bool. | 247 // This hack helps detect such unwanted implicit conversions from T* to bool. |
| 248 v8::Handle<v8::Value> toV8(void* value, v8::Handle<v8::Object> creationContext,
v8::Isolate*); | 248 v8::Local<v8::Value> toV8(void* value, v8::Local<v8::Object> creationContext, v8
::Isolate*); |
| 249 | 249 |
| 250 } // namespace blink | 250 } // namespace blink |
| 251 | 251 |
| 252 #endif // ToV8_h | 252 #endif // ToV8_h |
| OLD | NEW |