Hello mpcomplete,

I'd like you to do a code review.  Please execute
        g4 diff -c 8187986

or point your web browser to
        http://mondrian/8187986

to review the following code:

Change 8187986 by [EMAIL PROTECTED] on 2008/09/05 14:03:59 *pending*

        Push the JsToken-specific parts of CreateModule out of module_wrapper.h
        and into js_runner_xx.cc.
        
        Also, ensure that Gears modules' destructors are public, otherwise
        CreateModule could have leaked them, if it failed to create the
        ModuleWrapperBaseClass for the ModuleImplBaseClass.
        
        R=mpcomplete
        [EMAIL PROTECTED]
        DELTA=178  (96 added, 50 deleted, 32 changed)
        OCL=8187986

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/js_runner.h#14 edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc#1 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc#27 
edit
... 
//depot/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.cc#11
 edit
... 
//depot/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.h#9
 edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#17 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_np.cc#24 
edit
... //depot/googleclient/gears/opensource/gears/base/common/module_wrapper.h#1 
edit
... //depot/googleclient/gears/opensource/gears/base/firefox/module_wrapper.h#7 
edit
... //depot/googleclient/gears/opensource/gears/base/ie/module_wrapper.h#5 edit
... //depot/googleclient/gears/opensource/gears/base/npapi/module_wrapper.h#5 
edit
... //depot/googleclient/gears/opensource/gears/httprequest/httprequest.h#10 
edit
... 
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.h#2
 edit
... 
//depot/googleclient/gears/opensource/gears/localserver/resource_store_module.h#3
 edit
... //depot/googleclient/gears/opensource/gears/media/audio.h#2 edit
... //depot/googleclient/gears/opensource/gears/media/time_ranges.h#2 edit

178 delta lines: 96 added, 50 deleted, 32 changed

Also consider running:
        g4 lint -c 8187986

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [EMAIL PROTECTED]
Change 8187986 by [EMAIL PROTECTED] on 2008/09/05 14:03:59 *pending*

        Push the JsToken-specific parts of CreateModule out of module_wrapper.h
        and into js_runner_xx.cc.
        
        Also, ensure that Gears modules' destructors are public, otherwise
        CreateModule could have leaked them, if it failed to create the
        ModuleWrapperBaseClass for the ModuleImplBaseClass.

Affected files ...

... //depot/googleclient/gears/opensource/gears/base/common/js_runner.h#14 edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc#1 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc#27 
edit
... 
//depot/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.cc#11
 edit
... 
//depot/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.h#9
 edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#17 
edit
... //depot/googleclient/gears/opensource/gears/base/common/js_runner_np.cc#24 
edit
... //depot/googleclient/gears/opensource/gears/base/common/module_wrapper.h#1 
edit
... //depot/googleclient/gears/opensource/gears/base/firefox/module_wrapper.h#7 
edit
... //depot/googleclient/gears/opensource/gears/base/ie/module_wrapper.h#5 edit
... //depot/googleclient/gears/opensource/gears/base/npapi/module_wrapper.h#5 
edit
... //depot/googleclient/gears/opensource/gears/httprequest/httprequest.h#10 
edit
... 
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.h#2
 edit
... 
//depot/googleclient/gears/opensource/gears/localserver/resource_store_module.h#3
 edit
... //depot/googleclient/gears/opensource/gears/media/audio.h#2 edit
... //depot/googleclient/gears/opensource/gears/media/time_ranges.h#2 edit

==== //depot/googleclient/gears/opensource/gears/base/common/js_runner.h#14 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner.h 2008-09-05 
14:00:45.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/js_runner.h 2008-09-05 
11:53:57.000000000 +1000
@@ -34,6 +34,7 @@
 #include "gears/base/common/string16.h"
 #include "gears/base/common/string_utils.h"
 
+class DispatcherInterface;
 class ModuleImplBaseClass;
 
 #if BROWSER_FF
@@ -120,11 +121,14 @@
                                      int64 *milliseconds_since_epoch) = 0;
 
 #if BROWSER_FF
-  virtual bool CreateJsTokenForModule(ModuleImplBaseClass *module,
-                                      JsToken *token_out) = 0;
   virtual bool GetModuleFromJsToken(JsToken token,
                                     ModuleImplBaseClass **module_out) = 0;
 #endif
+
+  // Creates and associates the ModuleWrapper for the ModuleImplBaseClass.
+  virtual bool InitializeModuleWrapper(ModuleImplBaseClass *module,
+                                       DispatcherInterface *dispatcher,
+                                       JsCallContext *context) = 0;
 
   // Invokes a callback. If optional_alloc_retval is specified, this method 
will
   // create a new JsRootedToken that the caller is responsible for deleting.
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc#1 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_cr.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_cr.cc     
2008-09-05 14:00:47.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/js_runner_cr.cc     
2008-09-05 13:45:36.000000000 +1000
@@ -45,6 +45,7 @@
 #include "gears/base/common/timed_call.h"
 #include "gears/base/npapi/browser_utils.h"
 #include "gears/base/npapi/module.h"
+#include "gears/base/npapi/module_wrapper.h"
 #include "gears/base/npapi/np_utils.h"
 #include "gears/base/npapi/scoped_npapi_handles.h"
 
@@ -220,6 +221,22 @@
 
     *milliseconds_since_epoch = 
static_cast<int64>(NPVARIANT_TO_DOUBLE(result));
 
+    return true;
+  }
+
+  bool InitializeModuleWrapper(ModuleImplBaseClass *module,
+                               DispatcherInterface *dispatcher,
+                               JsCallContext *context) {
+    ModuleWrapper *module_wrapper = static_cast<ModuleWrapper *>(
+        NPN_CreateObject(GetContext(), ModuleWrapper::GetNPClass()));
+    if (!module_wrapper) {
+      if (context) {
+        context->SetException(STRING16(L"Module creation failed."));
+      }
+      return false;
+    }
+    module_wrapper->Init(module, dispatcher);
+    module->SetJsWrapper(module_wrapper);
     return true;
   }
 
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc#27 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_ff.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_ff.cc     
2008-09-05 14:00:48.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/js_runner_ff.cc     
2008-09-05 14:00:19.000000000 +1000
@@ -59,6 +59,7 @@
 #include "gears/base/common/scoped_token.h"
 #include "gears/base/common/string_utils.h"
 #include "gears/base/firefox/dom_utils.h"
+#include "gears/base/firefox/module_wrapper.h"
 
 static const int kGarbageCollectionIntervalMsec = 2000;
 
@@ -169,10 +170,6 @@
     return true;
   }
 
-  bool CreateJsTokenForModule(ModuleImplBaseClass *module, JsToken *token_out) 
{
-    return alloc_js_wrapper_->CreateJsTokenForModule(module, token_out);
-  }
-
   bool GetModuleFromJsToken(JsToken token, ModuleImplBaseClass **module_out) {
     ModuleImplBaseClass *module =
         alloc_js_wrapper_->GetModuleFromJsToken(token);
@@ -181,6 +178,25 @@
       return true;
     }
     return false;
+  }
+
+  bool InitializeModuleWrapper(ModuleImplBaseClass *module,
+                               DispatcherInterface *dispatcher,
+                               JsCallContext *context) {
+    JsToken js_token;
+    if (!alloc_js_wrapper_->CreateJsTokenForModule(module,
+                                                   dispatcher,
+                                                   &js_token)) {
+      if (context) {
+        context->SetException(STRING16(L"Module creation failed."));
+      }
+      return false;
+    }
+
+    ModuleWrapper *module_wrapper = new ModuleWrapper(js_token, GetContext());
+    module_wrapper->Init(module, dispatcher);
+    module->SetJsWrapper(module_wrapper);
+    return true;
   }
 
   virtual bool InvokeCallbackSpecialized(
==== 
//depot/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.cc#11
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.cc  
2008-08-13 12:19:18.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.cc  
2008-09-05 13:58:51.000000000 +1000
@@ -252,6 +252,7 @@
 
 
 bool JsContextWrapper::CreateJsTokenForModule(ModuleImplBaseClass *module,
+                                              DispatcherInterface *dispatcher,
                                               JsToken *token_out) {
   // We require the name property to be set since we use it as the key for
   // caching created prototype objects.
@@ -276,9 +277,7 @@
                       alloc_js_class.get());
     js_class = alloc_js_class.get();
 
-    if (!proto ||
-        !AddAllFunctionsToPrototype(proto,
-                                    module->GetWrapper()->GetDispatcher())) {
+    if (!proto || !AddAllFunctionsToPrototype(proto, dispatcher)) {
       return false;
     }
 
==== 
//depot/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.h#9
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.h   
2008-08-13 12:19:18.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/js_runner_ff_marshaling.h   
2008-09-05 13:58:09.000000000 +1000
@@ -92,7 +92,9 @@
 
   // Creates a new JavaScript object to represent a Gears module in the JS
   // engine.
-  bool CreateJsTokenForModule(ModuleImplBaseClass *module, JsToken *token_out);
+  bool CreateJsTokenForModule(ModuleImplBaseClass *module,
+                              DispatcherInterface *dispatcher,
+                              JsToken *token_out);
 
   ModuleImplBaseClass *GetModuleFromJsToken(const JsToken token);
 
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc#17 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_ie.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_ie.cc     
2008-09-04 12:14:09.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/js_runner_ie.cc     
2008-09-05 13:54:33.000000000 +1000
@@ -56,6 +56,7 @@
 #endif
 #include "gears/base/ie/activex_utils.h"
 #include "gears/base/ie/atl_headers.h"
+#include "gears/base/ie/module_wrapper.h"
 #include "third_party/AtlActiveScriptSite.h"
 
 
@@ -147,6 +148,22 @@
     }
 
     *milliseconds_since_epoch = static_cast<int64>(V_R8(&retval));
+    return true;
+  }
+
+  bool InitializeModuleWrapper(ModuleImplBaseClass *module,
+                               DispatcherInterface *dispatcher,
+                               JsCallContext *context) {
+    CComObject<ModuleWrapper> *module_wrapper;
+    HRESULT hr = CComObject<ModuleWrapper>::CreateInstance(&module_wrapper);
+    if (FAILED(hr)) {
+      if (context) {
+        context->SetException(STRING16(L"Module creation failed."));
+      }
+      return false;
+    }
+    module_wrapper->Init(module, dispatcher);
+    module->SetJsWrapper(module_wrapper);
     return true;
   }
 
==== //depot/googleclient/gears/opensource/gears/base/common/js_runner_np.cc#24 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/js_runner_np.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/js_runner_np.cc     
2008-09-05 14:00:48.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/js_runner_np.cc     
2008-09-05 13:02:51.000000000 +1000
@@ -48,6 +48,7 @@
 #include "gears/base/common/thread_locals.h"
 #include "gears/base/npapi/browser_utils.h"
 #include "gears/base/npapi/module.h"
+#include "gears/base/npapi/module_wrapper.h"
 #include "gears/base/npapi/np_utils.h"
 #include "gears/base/npapi/scoped_npapi_handles.h"
 #ifdef BROWSER_WEBKIT
@@ -180,6 +181,22 @@
 
     *milliseconds_since_epoch = 
static_cast<int64>(NPVARIANT_TO_DOUBLE(result));
 
+    return true;
+  }
+
+  bool InitializeModuleWrapper(ModuleImplBaseClass *module,
+                               DispatcherInterface *dispatcher,
+                               JsCallContext *context) {
+    ModuleWrapper *module_wrapper = static_cast<ModuleWrapper *>(
+        NPN_CreateObject(GetContext(), ModuleWrapper::GetNPClass()));
+    if (!module_wrapper) {
+      if (context) {
+        context->SetException(STRING16(L"Module creation failed."));
+      }
+      return false;
+    }
+    module_wrapper->Init(module, dispatcher);
+    module->SetJsWrapper(module_wrapper);
     return true;
   }
 
==== //depot/googleclient/gears/opensource/gears/base/common/module_wrapper.h#1 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/common/module_wrapper.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/common/module_wrapper.h    
2008-09-05 14:00:48.000000000 +1000
+++ googleclient/gears/opensource/gears/base/common/module_wrapper.h    
2008-09-05 12:37:06.000000000 +1000
@@ -26,6 +26,12 @@
 #ifndef GEARS_BASE_COMMON_MODULE_WRAPPER_H__
 #define GEARS_BASE_COMMON_MODULE_WRAPPER_H__
 
+// TODO(nigeltao): Delete this file (and all occurences of #include
+// "gears/base/common/module_wrapper.h" from the rest of the codebase), push
+// the platform-specific #include "gears/base/xx/module_wrapper.h" into
+// js_runner_xx.cc, and move CreateModule<T> out of base/xx/module_wrapper.h
+// and into base/common/base_class.h.
+
 #ifdef BROWSER_NPAPI
 #include "gears/base/npapi/module_wrapper.h"
 #elif BROWSER_FF
==== 
//depot/googleclient/gears/opensource/gears/base/firefox/module_wrapper.h#7 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/firefox/module_wrapper.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/firefox/module_wrapper.h   
2008-08-20 18:02:36.000000000 +1000
+++ googleclient/gears/opensource/gears/base/firefox/module_wrapper.h   
2008-09-05 13:10:17.000000000 +1000
@@ -45,25 +45,18 @@
 // When that happens, this object is finally deleted.
 class ModuleWrapper : public ModuleWrapperBaseClass {
  public:
-  ModuleWrapper(ModuleImplBaseClass *impl,
-                DispatcherInterface *dispatcher)
-      : token_(0), js_context_(NULL) {
+  ModuleWrapper(JsToken token, JsContextPtr js_context)
+      : token_(token), js_context_(js_context) {
     LEAK_COUNTER_INCREMENT(ModuleWrapper);
-    impl_.reset(impl);
-    dispatcher_.reset(dispatcher);
   }
 
   virtual ~ModuleWrapper() {
     LEAK_COUNTER_DECREMENT(ModuleWrapper);
   }
 
-  void InitModuleWrapper(JsToken token, JsContextPtr js_context) {
-    assert(token_ == 0);
-    assert(token);
-    assert(!js_context_);
-    assert(js_context);
-    token_ = token;
-    js_context_ = js_context;
+  void Init(ModuleImplBaseClass *impl, DispatcherInterface *dispatcher) {
+    impl_.reset(impl);
+    dispatcher_.reset(dispatcher);
   }
 
   virtual JsToken GetWrapperToken() const {
@@ -120,33 +113,24 @@
   DISALLOW_EVIL_CONSTRUCTORS(ModuleWrapper);
 };
 
+
 // Creates an instance of the class and its wrapper.
 template<class GearsClass, class OutType>
 bool CreateModule(ModuleEnvironment *module_environment,
                   JsCallContext *context,
                   scoped_refptr<OutType>* module) {
-  GearsClass *impl = new GearsClass(); 
+  scoped_ptr<GearsClass> impl(new GearsClass()); 
   impl->InitModuleEnvironment(module_environment);
-  Dispatcher<GearsClass> *dispatcher = new Dispatcher<GearsClass>(impl);
+  scoped_ptr<Dispatcher<GearsClass> > dispatcher(
+      new Dispatcher<GearsClass>(impl.get()));
 
-  // NOTE: A little weird to use scoped_ptr here because ModuleWrapper is
-  // ref-counted, but we're still initializing things here and add-ref'ing a
-  // ModuleWrapper before it has its JS object doesn't make sense.
-  scoped_ptr<ModuleWrapper> module_wrapper(new ModuleWrapper(impl, 
dispatcher));
-  impl->SetJsWrapper(module_wrapper.get());
-
-  JsRunnerInterface *js_runner = module_environment->js_runner_;
-  JsToken js_token;
-  if (!js_runner->CreateJsTokenForModule(impl, &js_token)) {
-    if (context) {
-      context->SetException(STRING16(L"Module creation failed."));
-    }
+  if (!module_environment->js_runner_->
+          InitializeModuleWrapper(impl.get(), dispatcher.get(), context)) {
     return false;
   }
 
-  module_wrapper->InitModuleWrapper(js_token, js_runner->GetContext());
-  module_wrapper.release();
-  module->reset(impl);
+  dispatcher.release();
+  module->reset(impl.release());
   return true;
 }
 
==== //depot/googleclient/gears/opensource/gears/base/ie/module_wrapper.h#5 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/ie/module_wrapper.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/ie/module_wrapper.h        
2008-07-30 16:55:29.000000000 +1000
+++ googleclient/gears/opensource/gears/base/ie/module_wrapper.h        
2008-09-05 12:48:22.000000000 +1000
@@ -122,28 +122,23 @@
 };
 
 
-
 // Creates an instance of the class and its wrapper.
 template<class GearsClass, class OutType>
 bool CreateModule(ModuleEnvironment *module_environment,
                   JsCallContext *context,
                   scoped_refptr<OutType>* module) {
-  CComObject<ModuleWrapper> *module_wrapper;
-  HRESULT hr = CComObject<ModuleWrapper>::CreateInstance(&module_wrapper);
-  if (FAILED(hr)) {
-    if (context) {
-      context->SetException(STRING16(L"Module creation failed."));
-    }
+  scoped_ptr<GearsClass> impl(new GearsClass()); 
+  impl->InitModuleEnvironment(module_environment);
+  scoped_ptr<Dispatcher<GearsClass> > dispatcher(
+      new Dispatcher<GearsClass>(impl.get()));
+
+  if (!module_environment->js_runner_->
+          InitializeModuleWrapper(impl.get(), dispatcher.get(), context)) {
     return false;
   }
 
-  GearsClass *impl = new GearsClass();
-  impl->InitModuleEnvironment(module_environment);
-  Dispatcher<GearsClass> *dispatcher = new Dispatcher<GearsClass>(impl);
-
-  module_wrapper->Init(impl, dispatcher);
-  impl->SetJsWrapper(module_wrapper);
-  module->reset(impl);
+  dispatcher.release();
+  module->reset(impl.release());
   return true;
 }
 
==== //depot/googleclient/gears/opensource/gears/base/npapi/module_wrapper.h#5 
- 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/base/npapi/module_wrapper.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/base/npapi/module_wrapper.h     
2008-07-30 16:55:29.000000000 +1000
+++ googleclient/gears/opensource/gears/base/npapi/module_wrapper.h     
2008-09-05 14:18:19.000000000 +1000
@@ -52,7 +52,6 @@
   void Init(ModuleImplBaseClass *impl, DispatcherInterface *dispatcher) {
     PluginBase::Init(dispatcher);
     impl_.reset(impl);
-    impl_->SetJsWrapper(this);
     dispatcher_.reset(dispatcher);
   }
 
@@ -89,26 +88,24 @@
 bool CreateModule(ModuleEnvironment *module_environment,
                   JsCallContext *context,
                   scoped_refptr<OutType>* module) {
-  ModuleWrapper *wrapper = static_cast<ModuleWrapper *>(
-      NPN_CreateObject(module_environment->js_runner_->GetContext(),
-                       ModuleWrapper::GetNPClass()));
+  scoped_ptr<GearsClass> impl(new GearsClass()); 
+  impl->InitModuleEnvironment(module_environment);
+  scoped_ptr<Dispatcher<GearsClass> > dispatcher(
+      new Dispatcher<GearsClass>(impl.get()));
 
-  if (!wrapper) {
-    if (context) {
-      context->SetException(STRING16(L"Module creation failed."));
-    }
+  if (!module_environment->js_runner_->
+          InitializeModuleWrapper(impl.get(), dispatcher.get(), context)) {
     return false;
   }
 
-  GearsClass *impl = new GearsClass;
-  impl->InitModuleEnvironment(module_environment);
-  wrapper->Init(impl, new Dispatcher<GearsClass>(impl));
-  module->reset(impl);
+  dispatcher.release();
+  module->reset(impl.release());
 
-  // In NPAPI, objects are created with refcount 1.  We want the scoped_refptr
-  // to have the only reference, so we unref here after giving a ref to the
-  // scoped_refptr.
-  wrapper->Unref();
+  // In NPAPI, objects are created with refcount 1.  We want module (the
+  // scoped_refptr<OutType>) to have the only reference, so we Unref here,
+  // after the scoped_refptr has taken a reference in the line above.
+  impl->GetWrapper()->Unref();
+
   return true;
 }
 
==== //depot/googleclient/gears/opensource/gears/httprequest/httprequest.h#10 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/httprequest/httprequest.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/httprequest/httprequest.h       
2008-09-05 14:00:48.000000000 +1000
+++ googleclient/gears/opensource/gears/httprequest/httprequest.h       
2008-09-05 12:24:29.000000000 +1000
@@ -43,6 +43,7 @@
   static const std::string kModuleName;
 
   GearsHttpRequest();
+  ~GearsHttpRequest();
 
   // IN: -
   // OUT: -
@@ -151,7 +152,6 @@
   // JsEventHandlerInterface implementation.
   virtual void HandleEvent(JsEventType event_type);
 
-  ~GearsHttpRequest();
   DISALLOW_EVIL_CONSTRUCTORS(GearsHttpRequest);
 };
 
==== 
//depot/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.h#2
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/localserver/managed_resource_store_module.h
 ====
# action=edit type=text
--- 
googleclient/gears/opensource/gears/localserver/managed_resource_store_module.h 
    2008-09-05 14:00:49.000000000 +1000
+++ 
googleclient/gears/opensource/gears/localserver/managed_resource_store_module.h 
    2008-09-05 12:13:32.000000000 +1000
@@ -43,6 +43,7 @@
  public:
   GearsManagedResourceStore()
       : ModuleImplBaseClass("GearsManagedResourceStore") {}
+  ~GearsManagedResourceStore();
 
   // IN: -
   // OUT: string
@@ -107,9 +108,6 @@
   // OUT: -
   void SetOncomplete(JsCallContext *context);
 
- protected:
-  ~GearsManagedResourceStore();
-
  private:
   // JsEventHandlerInterface
   virtual void HandleEvent(JsEventType event_type);
==== 
//depot/googleclient/gears/opensource/gears/localserver/resource_store_module.h#3
 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/localserver/resource_store_module.h
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/localserver/resource_store_module.h     
2008-09-05 14:00:49.000000000 +1000
+++ googleclient/gears/opensource/gears/localserver/resource_store_module.h     
2008-09-05 12:13:43.000000000 +1000
@@ -54,6 +54,7 @@
   static const std::string kModuleName;
 
   GearsResourceStore();
+  ~GearsResourceStore();
 
   // IN: -
   // OUT: string
@@ -118,9 +119,6 @@
   // OUT: GearsFileSubmitter
   void CreateFileSubmitter(JsCallContext *context);
 
- protected:
-  ~GearsResourceStore();
-
  private:
   bool ResolveAndAppendUrl(const std::string16 &url, CaptureRequest *request);
   bool ResolveUrl(const std::string16 &url, std::string16 *resolved_url);
==== //depot/googleclient/gears/opensource/gears/media/audio.h#2 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/media/audio.h ====
# action=edit type=text
--- googleclient/gears/opensource/gears/media/audio.h   2008-09-05 
14:00:49.000000000 +1000
+++ googleclient/gears/opensource/gears/media/audio.h   2008-09-05 
12:26:47.000000000 +1000
@@ -37,6 +37,7 @@
       public ModuleImplBaseClass {
  public:
   GearsAudio();
+  ~GearsAudio();
 
   // 1. TODO(aprasath): API from GearsMedia that are overridden should be
   // added here later. Overriding of couple of API shown below.
@@ -46,9 +47,6 @@
   // 2. TODO(aprasath): Any new API introduced in this subclass
   // is to be added here.
 
- protected:
-  ~GearsAudio();
-
  private:
   DISALLOW_EVIL_CONSTRUCTORS(GearsAudio);
 };
==== //depot/googleclient/gears/opensource/gears/media/time_ranges.h#2 - 
c:\devel\srcwingears2/googleclient/gears/opensource/gears/media/time_ranges.h 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/media/time_ranges.h     2008-09-05 
14:00:49.000000000 +1000
+++ googleclient/gears/opensource/gears/media/time_ranges.h     2008-09-05 
12:18:52.000000000 +1000
@@ -34,6 +34,7 @@
 class GearsTimeRanges : public ModuleImplBaseClass {
  public:
   GearsTimeRanges();
+  ~GearsTimeRanges();
   
   // readonly attribute unsigned long length;
   void GetLength(JsCallContext * context);
@@ -44,9 +45,6 @@
   // float end(long index)
   void End(JsCallContext *context);
 
- protected:
-  ~GearsTimeRanges();
-
  private:
   DISALLOW_EVIL_CONSTRUCTORS(GearsTimeRanges);
 };

Reply via email to