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

Unified Diff: Source/bindings/core/v8/ScriptWrappable.cpp

Issue 422873002: bindings: Introduces ScriptWrappableBase to provide the internal pointer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/ScriptWrappable.cpp
diff --git a/Source/modules/crypto/AesKeyAlgorithm.h b/Source/bindings/core/v8/ScriptWrappable.cpp
similarity index 77%
copy from Source/modules/crypto/AesKeyAlgorithm.h
copy to Source/bindings/core/v8/ScriptWrappable.cpp
index 6194be77bf04b877286e441d2936c958467b9321..9c7ff976ae7cee2f59b85f3bb3ffa599f6ab7b56 100644
--- a/Source/modules/crypto/AesKeyAlgorithm.h
+++ b/Source/bindings/core/v8/ScriptWrappable.cpp
@@ -28,30 +28,20 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef AesKeyAlgorithm_h
-#define AesKeyAlgorithm_h
-
+#include "config.h"
#include "bindings/core/v8/ScriptWrappable.h"
-#include "modules/crypto/KeyAlgorithm.h"
-#include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
namespace blink {
-class AesKeyAlgorithm : public KeyAlgorithm {
-public:
- static AesKeyAlgorithm* create(const WebCryptoKeyAlgorithm&);
-
- unsigned short length();
+struct SameSizeAsScriptWrappableBase { };
- virtual void trace(Visitor*) OVERRIDE;
+COMPILE_ASSERT(sizeof(ScriptWrappableBase) <= sizeof(SameSizeAsScriptWrappableBase), ScriptWrappableBase_should_stay_small);
-private:
- explicit AesKeyAlgorithm(const WebCryptoKeyAlgorithm&);
+struct SameSizeAsScriptWrappable : public ScriptWrappableBase {
+ virtual ~SameSizeAsScriptWrappable() { }
+ uintptr_t m_wrapperOrTypeInfo;
};
-DEFINE_KEY_ALGORITHM_TYPE_CASTS(AesKeyAlgorithm);
+COMPILE_ASSERT(sizeof(ScriptWrappable) <= sizeof(SameSizeAsScriptWrappable), ScriptWrappable_should_stay_small);
} // namespace blink
-
-#endif

Powered by Google App Engine
This is Rietveld 408576698