Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: Source/bindings/v8/DOMWrapperMap.h

Issue 40433002: Make wrapperTypeInfo static member const in bindings classes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/CustomElementConstructorBuilder.cpp ('k') | Source/bindings/v8/NPV8Object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 private: 114 private:
115 static void makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Object>* wrapp er, DOMWrapperMap<KeyType>*); 115 static void makeWeakCallback(v8::Isolate*, v8::Persistent<v8::Object>* wrapp er, DOMWrapperMap<KeyType>*);
116 116
117 v8::Isolate* m_isolate; 117 v8::Isolate* m_isolate;
118 MapType m_map; 118 MapType m_map;
119 }; 119 };
120 120
121 template<> 121 template<>
122 inline void DOMWrapperMap<void>::makeWeakCallback(v8::Isolate* isolate, v8::Pers istent<v8::Object>* wrapper, DOMWrapperMap<void>* map) 122 inline void DOMWrapperMap<void>::makeWeakCallback(v8::Isolate* isolate, v8::Pers istent<v8::Object>* wrapper, DOMWrapperMap<void>* map)
123 { 123 {
124 WrapperTypeInfo* type = toWrapperTypeInfo(*wrapper); 124 const WrapperTypeInfo* type = toWrapperTypeInfo(*wrapper);
125 ASSERT(type->derefObjectFunction); 125 ASSERT(type->derefObjectFunction);
126 void* key = static_cast<void*>(toNative(*wrapper)); 126 void* key = static_cast<void*>(toNative(*wrapper));
127 ASSERT(*(map->m_map.get(key).persistent()) == *wrapper); 127 ASSERT(*(map->m_map.get(key).persistent()) == *wrapper);
128 map->removeAndDispose(key); 128 map->removeAndDispose(key);
129 type->derefObject(key); 129 type->derefObject(key);
130 } 130 }
131 131
132 } // namespace WebCore 132 } // namespace WebCore
133 133
134 #endif // DOMWrapperMap_h 134 #endif // DOMWrapperMap_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/CustomElementConstructorBuilder.cpp ('k') | Source/bindings/v8/NPV8Object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698