[email protected] | a22998a | 2013-11-10 05:00:50 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | c07006b | 2013-11-20 03:01:44 | [diff] [blame^] | 5 | #include "gin/public/wrapper_info.h" |
[email protected] | a22998a | 2013-11-10 05:00:50 | [diff] [blame] | 6 | |
| 7 | namespace gin { |
| 8 | |
| 9 | WrapperInfo* WrapperInfo::From(v8::Handle<v8::Object> object) { |
| 10 | if (object->InternalFieldCount() != kNumberOfInternalFields) |
| 11 | return NULL; |
| 12 | return static_cast<WrapperInfo*>( |
| 13 | object->GetAlignedPointerFromInternalField(kWrapperInfoIndex)); |
| 14 | } |
| 15 | |
| 16 | } // namespace gin |