forked from brave-experiments/ad-block
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addon.cc
34 lines (26 loc) · 901 Bytes
/
addon.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* Copyright (c) 2015 Brian R. Bondy. Distributed under the MPL2 license.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <node.h>
#include "./ad_block_client_wrap.h"
namespace {
using v8::Local;
using v8::Object;
void InitAll(Local<Object> exports) {
ad_block_client_wrap::AdBlockClientWrap::Init(exports);
}
void InitAll(v8::Local<v8::Object> exports,
v8::Local<v8::Value> unused, void* priv) {
InitAll(exports);
}
void InitAll(v8::Local<v8::Object> exports, v8::Local<v8::Value> unused,
v8::Local<v8::Context> context, void* priv) {
InitAll(exports);
}
} // namespace
#ifdef AD_BLOCK_INTERNAL_MODULE
NODE_MODULE_CONTEXT_AWARE_BUILTIN(ad_block, InitAll)
#else
NODE_MODULE(ad_block, InitAll)
#endif