| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 ASSERT(wrapperTypeInfo->gcType == RefCountedObject); | 72 ASSERT(wrapperTypeInfo->gcType == RefCountedObject); |
| 73 #else | 73 #else |
| 74 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); | 74 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); |
| 75 #endif | 75 #endif |
| 76 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, internalP
ointer); | 76 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperObjectIndex, internalP
ointer); |
| 77 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<
WrapperTypeInfo*>(wrapperTypeInfo)); | 77 wrapper->SetAlignedPointerInInternalField(v8DOMWrapperTypeIndex, const_cast<
WrapperTypeInfo*>(wrapperTypeInfo)); |
| 78 } | 78 } |
| 79 | 79 |
| 80 inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> w
rapper, const WrapperTypeInfo* wrapperTypeInfo, ScriptWrappableBase* internalPoi
nter) | 80 inline void V8DOMWrapper::setNativeInfoForHiddenWrapper(v8::Handle<v8::Object> w
rapper, const WrapperTypeInfo* wrapperTypeInfo, ScriptWrappableBase* internalPoi
nter) |
| 81 { | 81 { |
| 82 // see V8WindowShell::installDOMWindow() comment for why this version is nee
ded and safe. | 82 // see WindowProxy::installDOMWindow() comment for why this version is neede
d and safe. |
| 83 ASSERT(wrapper->InternalFieldCount() >= 2); | 83 ASSERT(wrapper->InternalFieldCount() >= 2); |
| 84 ASSERT(internalPointer); | 84 ASSERT(internalPointer); |
| 85 ASSERT(wrapperTypeInfo); | 85 ASSERT(wrapperTypeInfo); |
| 86 #if ENABLE(OILPAN) | 86 #if ENABLE(OILPAN) |
| 87 ASSERT(wrapperTypeInfo->gcType != RefCountedObject); | 87 ASSERT(wrapperTypeInfo->gcType != RefCountedObject); |
| 88 #else | 88 #else |
| 89 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); | 89 ASSERT(wrapperTypeInfo->gcType == RefCountedObject || wrapperTypeInfo->gcTyp
e == WillBeGarbageCollectedObject); |
| 90 #endif | 90 #endif |
| 91 | 91 |
| 92 // Clear out the last internal field, which is assumed to contain a valid pe
rsistent pointer value. | 92 // 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... |
| 173 v8::Handle<v8::Context> context() const { return m_context; } | 173 v8::Handle<v8::Context> context() const { return m_context; } |
| 174 | 174 |
| 175 private: | 175 private: |
| 176 bool m_didEnterContext; | 176 bool m_didEnterContext; |
| 177 v8::Handle<v8::Context> m_context; | 177 v8::Handle<v8::Context> m_context; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 } // namespace blink | 180 } // namespace blink |
| 181 | 181 |
| 182 #endif // V8DOMWrapper_h | 182 #endif // V8DOMWrapper_h |
| OLD | NEW |