#include "third_party/WebKit/public/web/WebPluginParams.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
+#include "third_party/WebKit/Source/wtf/ArrayBufferContents.h"
#include "atom/common/node_includes.h"
return frame->uniqueName().utf8() == "ATOM_SHELL_GUEST_WEB_VIEW";
}
+void* BlinkAllocate(size_t size) {
+ void* ptr = nullptr;
+ WTF::ArrayBufferContents::allocateMemory(
+ size, WTF::ArrayBufferContents::DontInitialize, ptr);
+ return ptr;
+}
+
+void BlinkFree(void* ptr, size_t size) {
+ WTF::ArrayBufferContents::freeMemory(ptr, size);
+}
+
// Helper class to forward the messages to the client.
class AtomRenderFrameObserver : public content::RenderFrameObserver {
public:
blink::WebCustomElement::addEmbedderCustomElementName("webview");
blink::WebCustomElement::addEmbedderCustomElementName("browserplugin");
+ // Override Node's Buffer allocator with WTF's allocator.
+ node::Buffer::SetAllocator(&BlinkAllocate, &BlinkFree);
+
node_bindings_->Initialize();
node_bindings_->PrepareMessageLoop();
BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \
'http://github-janky-artifacts.s3.amazonaws.com/libchromiumcontent'
-LIBCHROMIUMCONTENT_COMMIT = '01345b4ef5f2a766e6f58dbbe7729fb089b357ba'
+LIBCHROMIUMCONTENT_COMMIT = '21768a17f4f1203a50df5c0908b788fa2ecb96ab'
PLATFORM = {
'cygwin': 'win32',