| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 ASSERT(wrapperTypeInfo->gcType == RefCountedObject); | 71 ASSERT(wrapperTypeInfo->gcType == RefCountedObject); |
| 72 #else | 72 #else |
| 73 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); | 73 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); |
| 74 #endif | 74 #endif |
| 75 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, object); | 75 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, object); |
| 76 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<
WrapperTypeInfo*>(wrapperTypeInfo)); | 76 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<
WrapperTypeInfo*>(wrapperTypeInfo)); |
| 77 } | 77 } |
| 78 | 78 |
| 79 inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> w
rapper, const WrapperTypeInfo* wrapperTypeInfo, void* object) | 79 inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> w
rapper, const WrapperTypeInfo* wrapperTypeInfo, void* object) |
| 80 { | 80 { |
| 81 // see V8WindowShell::installDOMWindow() comment for why this version is nee
ded and safe. | 81 // see WindowProxy::installDOMWindow() comment for why this version is neede
d and safe. |
| 82 ASSERT(wrapper->InternalFieldCount() >= 2); | 82 ASSERT(wrapper->InternalFieldCount() >= 2); |
| 83 ASSERT(object); | 83 ASSERT(object); |
| 84 ASSERT(wrapperTypeInfo); | 84 ASSERT(wrapperTypeInfo); |
| 85 #if ENABLE(OILPAN) | 85 #if ENABLE(OILPAN) |
| 86 ASSERT(wrapperTypeInfo->gcType != RefCountedObject); | 86 ASSERT(wrapperTypeInfo->gcType != RefCountedObject); |
| 87 #else | 87 #else |
| 88 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); | 88 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 // Clear out the last internal field, which is assumed to contain a valid pe
rsistent pointer value. | 91 // Clear out the last internal field, which is assumed to contain a valid pe
rsistent pointer value. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 v8::Handle<v8::Context> context() const { return m_context; } | 172 v8::Handle<v8::Context> context() const { return m_context; } |
| 173 | 173 |
| 174 private: | 174 private: |
| 175 bool m_didEnterContext; | 175 bool m_didEnterContext; |
| 176 v8::Handle<v8::Context> m_context; | 176 v8::Handle<v8::Context> m_context; |
| 177 }; | 177 }; |
| 178 | 178 |
| 179 } // namespace blink | 179 } // namespace blink |
| 180 | 180 |
| 181 #endif // V8DOMWrapper_h | 181 #endif // V8DOMWrapper_h |
| OLD | NEW |