r47508 - in /trunk/libjavascript-perl/debian: changelog patches/remove-branch-handler patches/series

diocles-guest at users.alioth.debian.org diocles-guest at users.alioth.debian.org
Thu Nov 19 22:52:01 UTC 2009


Author: diocles-guest
Date: Thu Nov 19 22:51:56 2009
New Revision: 47508

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=47508
Log:
Update for changes in Xulrunner API. (Closes: #551251)

Added:
    trunk/libjavascript-perl/debian/patches/remove-branch-handler
Modified:
    trunk/libjavascript-perl/debian/changelog
    trunk/libjavascript-perl/debian/patches/series

Modified: trunk/libjavascript-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-perl/debian/changelog?rev=47508&op=diff
==============================================================================
--- trunk/libjavascript-perl/debian/changelog (original)
+++ trunk/libjavascript-perl/debian/changelog Thu Nov 19 22:51:56 2009
@@ -4,8 +4,10 @@
     + Add self to Uploaders.
     + Add quilt to Build-Depends.
   * debian/rules: Use quilt patch system.
-  * debian/patches/use-set-operation-callback: New patch for changes in
-    Xulrunner API.
+  * Update for changes in Xulrunner API. (Closes: #551251)
+    + debian/patches/use-set-operation-callback: Use JS_SetOperationCallback
+      rather than JS_SetBranchCallback.
+    + debian/patches/remove-branch-handler: Remove broken branch handling.
 
  -- Tim Retout <tim at retout.co.uk>  Thu, 19 Nov 2009 22:39:21 +0000
 

Added: trunk/libjavascript-perl/debian/patches/remove-branch-handler
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-perl/debian/patches/remove-branch-handler?rev=47508&op=file
==============================================================================
--- trunk/libjavascript-perl/debian/patches/remove-branch-handler (added)
+++ trunk/libjavascript-perl/debian/patches/remove-branch-handler Thu Nov 19 22:51:56 2009
@@ -1,0 +1,145 @@
+--- a/JavaScript.xs
++++ b/JavaScript.xs
+@@ -153,6 +153,7 @@
+     CODE:
+         JS_SetVersion(PJS_GetJSContext(cx), JS_StringToVersion(version));
+         
++#if 0
+ void
+ jsc_set_branch_handler(cx, handler)
+     JavaScript::Context cx;
+@@ -176,6 +177,8 @@
+             JS_SetOperationCallback(PJS_GetJSContext(cx), PJS_branch_handler);
+         }
+ 
++#endif
++
+ void
+ jsc_bind_function(cx, name, callback)
+     JavaScript::Context cx;
+--- a/lib/JavaScript/Context.pm
++++ b/lib/JavaScript/Context.pm
+@@ -291,14 +291,6 @@
+     jsc_unbind_value($self, $parent, $name);
+ }
+ 
+-sub set_branch_handler {
+-    my ($self, $handler) = @_;
+-
+-    $handler = _resolve_method($handler, 1);
+-
+-    jsc_set_branch_handler($self, $handler);
+-}
+-
+ sub compile {
+     my $self = shift;
+     my $source = shift;
+@@ -538,14 +530,6 @@
+ 
+ Returns the C<JavaScript::Context>-object associated with a given native context.
+ 
+-=item set_branch_handler ( $handler )
+-
+-Attaches an branch callback handler (a function that is called when a branch is performed) to the context. The argument I<$handler> may be a code-reference or the name of a subroutine.
+-
+-To remove the handler call this method with an undefined argument.
+-
+-The handler is called when a script branches backwards during execution, when a function returns and the end of the script. To continue execution the handler must return a true value. To abort execution either throw an exception or return a false value.
+-
+ =item get_version ( )
+ 
+ Returns the runtime version of the context as a string, for exmaple C<1.7> or or C<ECMAv3>.
+@@ -649,10 +633,6 @@
+ 
+ Removes a new named property in I<parent>.
+ 
+-=item jsc_set_branch_handler ( PJS_Context *context, SV *handler )
+-
+-Attaches a branch handler to the context. No check is made to see if I<handler> is a valid SVt_PVCV.
+-
+ =item jsc_get_version ( PJS_Context *context )
+ 
+ Returns the version of the context as a string, for example "1.7"
+--- a/t/21-branch-handler.t
++++ /dev/null
+@@ -1,30 +0,0 @@
+-#!perl
+-
+-use Test::More tests => 3;
+-
+-use strict;
+-use warnings;
+-
+-use JavaScript;
+-
+-my $called = 0;
+-sub branch_handler {
+-    $called++;
+-    return 1;
+-}
+-
+-my $rt1 = JavaScript::Runtime->new();
+-my $cx1 = $rt1->create_context();
+-
+-$cx1->eval("for(i = 0; i < 10; i++) {}");
+-is($called, 0);
+-
+-$cx1->set_branch_handler(\&branch_handler);
+-$cx1->eval("for(i = 0; i < 10; i++) {}");
+-is($called, 10);
+-
+-$cx1->set_branch_handler(undef);
+-$called = 0;
+-$cx1->eval("for(i = 0; i < 10; i++) {}");
+-is($called, 0);
+-
+--- a/PJS_Context.h
++++ b/PJS_Context.h
+@@ -35,9 +35,6 @@
+     PJS_Context *next;      /* Pointer to the next created context */
+     PJS_Runtime *rt;
+ 
+-    /* Set to a SVt_PVCV if we have an branch handler */
+-    SV *branch_handler;
+-    
+     /* Flags */
+     U32 flags;
+ };
+@@ -69,9 +66,6 @@
+ PJS_EXTERN PJS_Context *
+ PJS_CreateContext(PJS_Runtime *runtime);
+ 
+-PJS_EXTERN JSBool
+-PJS_branch_handler(JSContext *, JSScript *);
+-
+ /*! @functiongroup Querying contexts */
+ 
+ /*! @function PJS_GetFunctionByName
+--- a/MANIFEST
++++ b/MANIFEST
+@@ -74,7 +74,6 @@
+ t/18-interrupt-handler.t
+ t/19-engine-version.t
+ t/20-bind-class.t
+-t/21-branch-handler.t
+ t/22-string-attributes.t
+ t/23-unicode.t
+ t/24-c-level-interrupt-handler.t
+--- a/PJS_Context.c
++++ b/PJS_Context.c
+@@ -198,6 +198,7 @@
+     return function;
+ }
+ 
++#if 0
+ /* Called by context when a branch occurs */
+ JSBool PJS_branch_handler(JSContext *cx, JSScript *script) {
+     dSP;
+@@ -238,6 +239,7 @@
+ 
+     return status;
+ }
++#endif
+ 
+ /*JSContext *
+ PJS_GetJSContext(PJS_Context *fromContext) {

Modified: trunk/libjavascript-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libjavascript-perl/debian/patches/series?rev=47508&op=diff
==============================================================================
--- trunk/libjavascript-perl/debian/patches/series (original)
+++ trunk/libjavascript-perl/debian/patches/series Thu Nov 19 22:51:56 2009
@@ -1,1 +1,2 @@
 use-set-operation-callback
+remove-branch-handler




More information about the Pkg-perl-cvs-commits mailing list