From a9a53ca05a410b8ca1067b4f1f2357c319e113d8 Mon Sep 17 00:00:00 2001 From: Scott Blomquist Date: Tue, 29 Oct 2013 12:49:41 -0700 Subject: [PATCH] doc: Update documentation to reflect ObjectWrap changes --- doc/api/addons.markdown | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/doc/api/addons.markdown b/doc/api/addons.markdown index a7a393db35..ff97326533 100644 --- a/doc/api/addons.markdown +++ b/doc/api/addons.markdown @@ -342,6 +342,7 @@ Here we expose the method `plusOne` by adding it to the constructor's prototype: #include + #include #include "myobject.h" using namespace v8; @@ -490,12 +491,8 @@ The implementation is similar to the above in `myobject.cc`: // Prototype tpl->PrototypeTemplate()->Set(String::NewSymbol("plusOne"), FunctionTemplate::New(PlusOne)->GetFunction()); -<<<<<<< HEAD constructor = Persistent::New(isolate, tpl->GetFunction()); -======= - constructor = Persistent::New(tpl->GetFunction()); ->>>>>>> upstream/v0.10 } Handle MyObject::New(const Arguments& args) { @@ -560,6 +557,7 @@ In the following `addon.cc` we introduce a function `add()` that can take on two `MyObject` objects: #include + #include #include "myobject.h" using namespace v8; @@ -602,6 +600,7 @@ can probe private values after unwrapping the object: #define MYOBJECT_H #include + #include class MyObject : public node::ObjectWrap { public: @@ -642,12 +641,8 @@ The implementation of `myobject.cc` is similar as before: Local tpl = FunctionTemplate::New(New); tpl->SetClassName(String::NewSymbol("MyObject")); tpl->InstanceTemplate()->SetInternalFieldCount(1); -<<<<<<< HEAD constructor = Persistent::New(isolate, tpl->GetFunction()); -======= - constructor = Persistent::New(tpl->GetFunction()); ->>>>>>> upstream/v0.10 } Handle MyObject::New(const Arguments& args) {