--- a/ipc/chromium/src/base/task.h
+++ b/ipc/chromium/src/base/task.h
@@ -296,7 +296,7 @@
  public:
   RunnableMethod(T* obj, Method meth, const Params& params)
       : obj_(obj), meth_(meth), params_(params) {
-    RetainCallee(obj_);
+    this->RetainCallee(obj_);
   }
   ~RunnableMethod() {
     ReleaseCallee();
--- a/xpcom/base/nsAutoRef.h
+++ b/xpcom/base/nsAutoRef.h
@@ -323,7 +323,7 @@
     void SafeAddRef()
     {
         if (this->HaveResource())
-            AddRef(this->get());
+            this->AddRef(this->get());
     }
 };
 
@@ -690,7 +690,7 @@
     void SafeRelease()
     {
         if (this->HaveResource())
-            Release(this->get());
+            this->Release(this->get());
     }
 };
 
--- a/xpcom/glue/nsBaseHashtable.h
+++ b/xpcom/glue/nsBaseHashtable.h
@@ -123,7 +123,7 @@
    */
   PRBool Get(KeyType aKey, UserDataType* pData NS_OUTPARAM) const
   {
-    EntryType* ent = GetEntry(aKey);
+    EntryType* ent = this->GetEntry(aKey);
 
     if (!ent)
       return PR_FALSE;
@@ -142,7 +142,7 @@
    */
   PRBool Put(KeyType aKey, UserDataType aData)
   {
-    EntryType* ent = PutEntry(aKey);
+    EntryType* ent = this->PutEntry(aKey);
 
     if (!ent)
       return PR_FALSE;
@@ -156,7 +156,7 @@
    * remove the data for the associated key
    * @param aKey the key to remove from the hashtable
    */
-  void Remove(KeyType aKey) { RemoveEntry(aKey); }
+  void Remove(KeyType aKey) { this->RemoveEntry(aKey); }
 
   /**
    * function type provided by the application for enumeration.
--- a/xpcom/glue/nsClassHashtable.h
+++ b/xpcom/glue/nsClassHashtable.h
@@ -98,7 +98,7 @@
 nsClassHashtable<KeyClass,T>::Get(KeyType aKey, T** retVal) const
 {
   typename nsBaseHashtable<KeyClass,nsAutoPtr<T>,T*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);
 
   if (ent)
   {
--- a/xpcom/glue/nsRefPtrHashtable.h
+++ b/xpcom/glue/nsRefPtrHashtable.h
@@ -112,7 +112,7 @@
   (KeyType aKey, UserDataType* pRefPtr) const
 {
   typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);
 
   if (ent)
   {
@@ -140,7 +140,7 @@
   (KeyType aKey, PRBool* aFound) const
 {
   typename nsBaseHashtable<KeyClass, nsRefPtr<RefPtr>, RefPtr*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);
 
   if (ent)
   {
--- a/xpcom/glue/nsInterfaceHashtable.h
+++ b/xpcom/glue/nsInterfaceHashtable.h
@@ -111,7 +111,7 @@
   (KeyType aKey, UserDataType* pInterface) const
 {
   typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);
 
   if (ent)
   {
@@ -139,7 +139,7 @@
   (KeyType aKey, PRBool* aFound) const
 {
   typename nsBaseHashtable<KeyClass, nsCOMPtr<Interface>, Interface*>::EntryType* ent =
-    GetEntry(aKey);
+    this->GetEntry(aKey);
 
   if (ent)
   {
--- a/xpcom/glue/nsTPtrArray.h
+++ b/xpcom/glue/nsTPtrArray.h
@@ -64,7 +64,7 @@
 
     // Initialize this array and pre-allocate some number of elements.
     explicit nsTPtrArray(size_type capacity) {
-      SetCapacity(capacity);
+      this->SetCapacity(capacity);
     }
     
     // The array's copy-constructor performs a 'deep' copy of the given array.
--- a/ipc/chromium/src/base/file_util.cc
+++ b/ipc/chromium/src/base/file_util.cc
@@ -8,7 +8,7 @@
 #include <io.h>
 #endif
 #include <stdio.h>
-
+#include <unistd.h>
 #include <fstream>
 
 #include "base/file_path.h"
--- a/ipc/chromium/src/base/message_pump_libevent.cc
+++ b/ipc/chromium/src/base/message_pump_libevent.cc
@@ -6,6 +6,7 @@
 
 #include <errno.h>
 #include <fcntl.h>
+#include <unistd.h>
 
 #include "eintr_wrapper.h"
 #include "base/logging.h"
--- a/ipc/chromium/src/base/file_util_linux.cc
+++ b/ipc/chromium/src/base/file_util_linux.cc
@@ -5,7 +5,7 @@
 #include "base/file_util.h"
 
 #include <fcntl.h>
-
+#include <unistd.h>
 #include <string>
 #include <vector>
 

--- a/ipc/chromium/src/base/time_posix.cc
+++ b/ipc/chromium/src/base/time_posix.cc
@@ -4,9 +4,11 @@
 
 #include "base/time.h"
 
+#include <unistd.h>
 #ifdef OS_MACOSX
 #include <mach/mach_time.h>
 #endif
+
 #include <sys/time.h>
 #include <time.h>
 
--- a/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc
+++ b/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 #include "chrome/common/file_descriptor_set_posix.h"
-
+#include <unistd.h>
 #include "base/eintr_wrapper.h"
 #include "base/logging.h"
 
--- a/gfx/ots/src/os2.cc
+++ b/gfx/ots/src/os2.cc
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <cstddef>
+
 #include "os2.h"
 
 #include "head.h"
