Skip to content

Commit

Permalink
Item14152: Merge commit 'f798fe266f44c16bd49cf3f8d61eab0e42a58688' in…
Browse files Browse the repository at this point in the history
…to Item14152

* commit 'f798fe266f44c16bd49cf3f8d61eab0e42a58688':
  Item13897: Turn on memorly leak detection only by FOSWIKI_CHECKLEAK environment variable.
  Item13897: Experimental rewrite of Foswiki::IncludeHandlers::doc
  Item13897: Minor documentation fixes.
  Item13897: Fixed loosing of cloned __orig_ attributes.
  Item13897: Fixed a problem with disapperaring $SERVER.
  Item13897: Fixed load_package() for more reliability
  Item13897: Fixed few memory leaks.
  • Loading branch information
vrurg committed Oct 7, 2016
2 parents 9cca120 + f798fe2 commit 213d909
Show file tree
Hide file tree
Showing 17 changed files with 902 additions and 149 deletions.
12 changes: 8 additions & 4 deletions JsonRpcContrib/lib/Foswiki/Contrib/JsonRpcContrib.pm
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# See bottom of file for license and copyright information

package Foswiki::Contrib::JsonRpcContrib;
use v5.14;

use Foswiki::Request ();
use Foswiki::Contrib::JsonRpcContrib::Server ();

use Moo;
use namespace::clean;
use Foswiki::Class;
extends qw(Foswiki::UI);

#BEGIN {
Expand Down Expand Up @@ -50,8 +48,14 @@ sub BUILD {
$SERVER = $this->server;
}

sub DEMOLISH {
undef $SERVER;
}

sub registerMethod {
$Foswiki::app->create(__PACKAGE__) unless $SERVER;
$Foswiki::app->heap->{JsonRpcContrib}{object} =
$Foswiki::app->create(__PACKAGE__)
unless $SERVER;
$SERVER->registerMethod(@_);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ lib/Unit/CGIEngine.pm 0644
lib/Unit/Eavesdrop.pm 0644
lib/Unit/ExternalEngine.pm 0644
lib/Unit/HTMLDiffer.pm 0644
lib/Unit/Leak/Object.pm 0644
lib/Unit/Response.pm 0644
lib/Unit/TestCase.pm 0644
lib/Unit/PlackTestCase.pm 0644
Expand Down
Loading

0 comments on commit 213d909

Please sign in to comment.