Bug 589016 - Allow registering path handlers from mochitests [r=waldo a=npotb]
authorEdward Lee <edilee@mozilla.com>
Tue, 31 Aug 2010 23:49:43 -0700
changeset 51827 f47972d054732237620655bd77d19e831d2efe19
parent 51826 5676d91f4d1cbdf9cc6646ce34ba8460bf9c0b6f
child 51828 51d17027ff45d6b9179601a3f06a6cc75830c855
push id15441
push useredward.lee@engineering.uiuc.edu
push dateWed, 01 Sep 2010 06:55:00 +0000
treeherdermozilla-central@f47972d05473 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo, npotb
bugs589016
milestone2.0b6pre
first release with
nightly linux32
f47972d05473 / 4.0b6pre / 20100901030700 / files
nightly linux64
f47972d05473 / 4.0b6pre / 20100901031045 / files
nightly mac
f47972d05473 / 4.0b6pre / 20100901030459 / files
nightly win32
f47972d05473 / 4.0b6pre / 20100901041125 / files
nightly win64
f47972d05473 / 4.0b6pre / 20100901011120 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 589016 - Allow registering path handlers from mochitests [r=waldo a=npotb] Export the registerPathHandler for use from .sjs.
netwerk/test/httpserver/httpd.js
--- a/netwerk/test/httpserver/httpd.js
+++ b/netwerk/test/httpserver/httpd.js
@@ -2597,16 +2597,20 @@ ServerHandler.prototype =
         s.importFunction(function getObjectState(k, callback)
         {
           callback(self._getObjectState(k));
         });
         s.importFunction(function setObjectState(k, v)
         {
           self._setObjectState(k, v);
         });
+        s.importFunction(function registerPathHandler(p, h)
+        {
+          self.registerPathHandler(p, h);
+        });
 
         // Make it possible for sjs files to access their location
         this._setState(path, "__LOCATION__", file.path);
 
         try
         {
           // Alas, the line number in errors dumped to console when calling the
           // request handler is simply an offset from where we load the SJS file.