Cheng Zhao
3a7a6efffb
GetConstructor should init default constructor
2016-08-02 17:20:41 +09:00
Cheng Zhao
2d26eebca8
Remove the Constructor class
2016-08-02 17:01:19 +09:00
Cheng Zhao
0a48af9ff7
Create objects from InstanceTemplate
2016-08-02 16:08:00 +09:00
Cheng Zhao
d55c3c5030
Turn Wrappable into using FunctionTemplate
2016-08-02 15:56:47 +09:00
Cheng Zhao
ab62755a88
Make InitWith virtual
2016-08-02 15:28:09 +09:00
Cheng Zhao
bd20bde1a2
Call the user call Init in Constructor
2016-08-02 15:14:48 +09:00
Cheng Zhao
ea07d4c6c8
Leak Wrappable's template
...
Since it is declared as static variable it will be released
automatically when process exits, which causes crashes in
renderer process because the template will then be released
later than V8 is closed.
This commit simply leaks the template so the crash won't happen,
this leak should be fine since leaking resource on exit is not
a bad thing.
2016-05-10 16:07:04 +09:00
Cheng Zhao
0df2d882ea
Make Wrappable a template class
2016-04-25 10:17:39 +09:00
Cheng Zhao
e859228db1
Do not manually destroy native resources
2015-12-03 15:38:14 +08:00
Cheng Zhao
8ca005eb41
Use the new SetWeak in Wrappable
2015-08-27 15:55:48 +08:00
Cheng Zhao
7b9926807d
Add IsDestroyed method for Wrappable
2015-07-06 18:16:57 +08:00
Cheng Zhao
cc4e2fcd94
Check for null when converting Wrappable
2015-06-24 16:35:37 +08:00
Cheng Zhao
cad1fa50a9
Make isolate() public
2015-06-23 17:13:02 +08:00
Cheng Zhao
0586822808
Remember isolate in Wrappable
2015-06-23 17:09:20 +08:00
Cheng Zhao
269be86998
Use Local instead of Handle
2015-05-22 19:11:02 +08:00
Cheng Zhao
40da835cbb
Don't reset handle before Wrappable is destroyed
...
It is possible that the user wants to use the V8 object in the destructor.
Fixes atom/atom-shell#1112 .
2015-03-23 16:20:59 +08:00
Cheng Zhao
d0db7bfb58
Add AfterInit method for Wrappable
2015-02-13 11:37:55 +08:00
Cheng Zhao
ace550d6b2
Simplify Wrappable API.
2014-04-16 11:58:17 +08:00
Cheng Zhao
ac5be7dad7
Constructor should wrap the this pointer.
2014-04-16 10:36:54 +08:00
Cheng Zhao
e2e1faa225
Make the Constructor accept arbitrary callback.
2014-04-16 09:50:51 +08:00
Cheng Zhao
caa5ea0316
Add initial Constructor type.
2014-04-15 15:30:46 +08:00
Cheng Zhao
4cada31f80
Do not rely on latest base/template_util.
2014-04-15 11:15:19 +08:00
Cheng Zhao
ff65b7dae1
Initial commit.
2014-04-15 11:04:36 +08:00