Browse files

Explain this vs holder

  • Loading branch information...
1 parent 3c76932 commit 135e14b494c5dcdece6dcfd87a7e6922bea91619 @nikhilm committed Jan 20, 2012
Showing with 5 additions and 19 deletions.
  1. +5 −19 slides.rst
View
24 slides.rst
@@ -406,28 +406,14 @@ Linking external libs in Waf:
Holder vs This
--------------
-args.Holder() refers to the object it should've been called on
-so that prototype chains work.
+* `args.This()` is always the this object passed in to the function
-Strings to-and-fro
-------------------
+* `args.Holder()` runs up the prototype chain to the 'right' object
-v8::String -> C string
+* Signatures decide the 'right' object, automatically handled by
+ `NODE_PROTOTYPE_SET_METHOD`
-.. code-block:: cpp
- :include: strings/main.cc
- :start-after: v8;
- :end-before: Handle<Value> Read
-
-Strings to-and-fro
-------------------
-
-C string -> v8::String
-
-.. code-block:: cpp
- :include: strings/main.cc
- :start-at: Handle<Value> Read
- :end-at: }
+* **Always** use `Holder()` to be on the safe side
Things I haven't covered
------------------------

0 comments on commit 135e14b

Please sign in to comment.