Don't use duprecated node buffer api, fix build error on OS X.

This commit is contained in:
Haojian Wu 2015-06-11 15:52:48 +08:00
parent f22662ffb2
commit 894f9c0cb0

View file

@ -128,6 +128,7 @@ void PrintPreviewMessageHandler::RunPrintToPDFCallback(
v8::HandleScope handle_scope(isolate);
if (data) {
v8::Local<v8::Value> buffer = node::Buffer::Use(
isolate,
const_cast<char*>(reinterpret_cast<const char*>(data->front())),
data->size());
print_to_pdf_callback_map_[request_id].Run(v8::Null(isolate), buffer);