mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Pass FunctionTemplate in BuildPrototype
This commit is contained in:
@@ -29,8 +29,8 @@ class Archive : public mate::Wrappable<Archive> {
|
||||
}
|
||||
|
||||
static void BuildPrototype(
|
||||
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
|
||||
mate::ObjectTemplateBuilder(isolate, prototype)
|
||||
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
|
||||
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
|
||||
.SetProperty("path", &Archive::GetPath)
|
||||
.SetMethod("getFileInfo", &Archive::GetFileInfo)
|
||||
.SetMethod("stat", &Archive::Stat)
|
||||
|
||||
@@ -22,8 +22,8 @@ class KeyWeakMap : public mate::Wrappable<KeyWeakMap<K>> {
|
||||
}
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> prototype) {
|
||||
mate::ObjectTemplateBuilder(isolate, prototype)
|
||||
v8::Local<v8::FunctionTemplate> prototype) {
|
||||
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
|
||||
.SetMethod("set", &KeyWeakMap<K>::Set)
|
||||
.SetMethod("get", &KeyWeakMap<K>::Get)
|
||||
.SetMethod("has", &KeyWeakMap<K>::Has)
|
||||
|
||||
@@ -355,8 +355,8 @@ mate::Handle<NativeImage> NativeImage::CreateFromDataURL(
|
||||
|
||||
// static
|
||||
void NativeImage::BuildPrototype(
|
||||
v8::Isolate* isolate, v8::Local<v8::ObjectTemplate> prototype) {
|
||||
mate::ObjectTemplateBuilder(isolate, prototype)
|
||||
v8::Isolate* isolate, v8::Local<v8::FunctionTemplate> prototype) {
|
||||
mate::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
|
||||
.SetMethod("toPNG", &NativeImage::ToPNG)
|
||||
.SetMethod("toJPEG", &NativeImage::ToJPEG)
|
||||
.SetMethod("toBitmap", &NativeImage::ToBitmap)
|
||||
|
||||
@@ -52,7 +52,7 @@ class NativeImage : public mate::Wrappable<NativeImage> {
|
||||
v8::Isolate* isolate, const GURL& url);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> prototype);
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
HICON GetHICON(int size);
|
||||
|
||||
Reference in New Issue
Block a user