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

Side by Side Diff: Source/bindings/v8/custom/V8ArrayBufferCustom.cpp

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
OLDNEW
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 27 matching lines...) Expand all
38 namespace WebCore { 38 namespace WebCore {
39 39
40 using namespace WTF; 40 using namespace WTF;
41 41
42 V8ArrayBufferDeallocationObserver* V8ArrayBufferDeallocationObserver::instance() 42 V8ArrayBufferDeallocationObserver* V8ArrayBufferDeallocationObserver::instance()
43 { 43 {
44 DEFINE_STATIC_LOCAL(V8ArrayBufferDeallocationObserver, deallocationObserver, ()); 44 DEFINE_STATIC_LOCAL(V8ArrayBufferDeallocationObserver, deallocationObserver, ());
45 return &deallocationObserver; 45 return &deallocationObserver;
46 } 46 }
47 47
48 WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = { 48 const WrapperTypeInfo V8ArrayBuffer::wrapperTypeInfo = {
49 0, V8ArrayBuffer::derefObject, 49 0, V8ArrayBuffer::derefObject,
50 0, 0, 0, 0, 0, WrapperTypeObjectPrototype 50 0, 0, 0, 0, 0, WrapperTypeObjectPrototype
51 }; 51 };
52 52
53 bool V8ArrayBuffer::HasInstance(v8::Handle<v8::Value> value, v8::Isolate*, Wrapp erWorldType) 53 bool V8ArrayBuffer::HasInstance(v8::Handle<v8::Value> value, v8::Isolate*, Wrapp erWorldType)
54 { 54 {
55 return value->IsArrayBuffer(); 55 return value->IsArrayBuffer();
56 } 56 }
57 57
58 bool V8ArrayBuffer::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isola te*) 58 bool V8ArrayBuffer::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::Isola te*)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 V8ArrayBufferDeallocationObserver::instance()); 92 V8ArrayBufferDeallocationObserver::instance());
93 RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(contents); 93 RefPtr<ArrayBuffer> buffer = ArrayBuffer::create(contents);
94 V8DOMWrapper::associateObjectWithWrapper<V8ArrayBuffer>(buffer.release(), &w rapperTypeInfo, object, v8::Isolate::GetCurrent(), WrapperConfiguration::Depende nt); 94 V8DOMWrapper::associateObjectWithWrapper<V8ArrayBuffer>(buffer.release(), &w rapperTypeInfo, object, v8::Isolate::GetCurrent(), WrapperConfiguration::Depende nt);
95 95
96 arraybufferPtr = object->GetAlignedPointerFromInternalField(v8DOMWrapperObje ctIndex); 96 arraybufferPtr = object->GetAlignedPointerFromInternalField(v8DOMWrapperObje ctIndex);
97 ASSERT(arraybufferPtr); 97 ASSERT(arraybufferPtr);
98 return reinterpret_cast<ArrayBuffer*>(arraybufferPtr); 98 return reinterpret_cast<ArrayBuffer*>(arraybufferPtr);
99 } 99 }
100 100
101 } // namespace WebCore 101 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8ArrayBufferCustom.h ('k') | Source/bindings/v8/custom/V8HTMLImageElementConstructor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698