Backout 327d9e9efbf7 (bug 773760) for bustage
authorEd Morley <emorley@mozilla.com>
Tue, 14 Aug 2012 16:23:02 +0100
changeset 107781 06a7377ac153d4e6df2792f000a0d05802f259c1
parent 107780 5bda15ef0b4c4433dc4dafd07d471f4b559f3c44
child 107782 d3faac91b5756cbdc148698aa27a3f6c832283cd
push id1490
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 18:29:50 +0000
treeherdermozilla-beta@f335e7dacdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs773760
milestone17.0a1
backs out327d9e9efbf796b3bcaf16678cc6366a59840bb5
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout 327d9e9efbf7 (bug 773760) for bustage
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
dom/ipc/PContent.ipdl
widget/android/nsClipboard.cpp
widget/nsITransferable.idl
widget/xpwidgets/nsTransferable.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -681,19 +681,17 @@ ContentParent::RecvReadPermissions(Infal
     // Ask for future changes
     mSendPermissionUpdates = true;
 #endif
 
     return true;
 }
 
 bool
-ContentParent::RecvSetClipboardText(const nsString& text,
-                                       const bool& isPrivateData,
-                                       const PRInt32& whichClipboard)
+ContentParent::RecvSetClipboardText(const nsString& text, const PRInt32& whichClipboard)
 {
     nsresult rv;
     nsCOMPtr<nsIClipboard> clipboard(do_GetService(kCClipboardCID, &rv));
     NS_ENSURE_SUCCESS(rv, true);
 
     nsCOMPtr<nsISupportsString> dataWrapper =
         do_CreateInstance(NS_SUPPORTS_STRING_CONTRACTID, &rv);
     NS_ENSURE_SUCCESS(rv, true);
@@ -702,17 +700,16 @@ ContentParent::RecvSetClipboardText(cons
     NS_ENSURE_SUCCESS(rv, true);
     
     nsCOMPtr<nsITransferable> trans = do_CreateInstance("@mozilla.org/widget/transferable;1", &rv);
     NS_ENSURE_SUCCESS(rv, true);
     trans->Init(nullptr);
     
     // If our data flavor has already been added, this will fail. But we don't care
     trans->AddDataFlavor(kUnicodeMime);
-    trans->SetIsPrivateData(isPrivateData);
     
     nsCOMPtr<nsISupports> nsisupportsDataWrapper =
         do_QueryInterface(dataWrapper);
     
     rv = trans->SetTransferData(kUnicodeMime, nsisupportsDataWrapper,
                                 text.Length() * sizeof(PRUnichar));
     NS_ENSURE_SUCCESS(rv, true);
     
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -196,17 +196,17 @@ private:
     virtual PStorageParent* AllocPStorage(const StorageConstructData& aData);
     virtual bool DeallocPStorage(PStorageParent* aActor);
 
     virtual bool RecvReadPrefsArray(InfallibleTArray<PrefTuple> *retValue);
     virtual bool RecvReadFontList(InfallibleTArray<FontListEntry>* retValue);
 
     virtual bool RecvReadPermissions(InfallibleTArray<IPC::Permission>* aPermissions);
 
-    virtual bool RecvSetClipboardText(const nsString& text, const bool& isPrivateData, const PRInt32& whichClipboard);
+    virtual bool RecvSetClipboardText(const nsString& text, const PRInt32& whichClipboard);
     virtual bool RecvGetClipboardText(const PRInt32& whichClipboard, nsString* text);
     virtual bool RecvEmptyClipboard();
     virtual bool RecvClipboardHasText(bool* hasText);
 
     virtual bool RecvGetSystemColors(const PRUint32& colorsCount, InfallibleTArray<PRUint32>* colors);
     virtual bool RecvGetIconForExtension(const nsCString& aFileExt, const PRUint32& aIconSize, InfallibleTArray<PRUint8>* bits);
     virtual bool RecvGetShowPasswordSetting(bool* showPassword);
 
--- a/dom/ipc/PContent.ipdl
+++ b/dom/ipc/PContent.ipdl
@@ -274,17 +274,17 @@ parent:
                 PRUint32 lineNumber, PRUint32 colNumber, PRUint32 flags,
                 nsCString category); 
 
     // nsIPermissionManager messages
     sync ReadPermissions() returns (Permission[] permissions);
 
     // These clipboard methods are only really used on Android since
     // the clipboard is not available in the content process.
-    SetClipboardText(nsString text, bool isPrivateData, PRInt32 whichClipboard);
+    SetClipboardText(nsString text, PRInt32 whichClipboard);
     sync GetClipboardText(PRInt32 whichClipboard)
         returns (nsString text);
     EmptyClipboard();
     sync ClipboardHasText()
         returns (bool hasText);
 
     sync GetSystemColors(PRUint32 colorsCount)
         returns (PRUint32[] colors);
--- a/widget/android/nsClipboard.cpp
+++ b/widget/android/nsClipboard.cpp
@@ -45,19 +45,17 @@ nsClipboard::SetData(nsITransferable *aT
 
   if (XRE_GetProcessType() == GeckoProcessType_Default) {
     if (AndroidBridge::Bridge())
       AndroidBridge::Bridge()->SetClipboardText(buffer);
     else
       return NS_ERROR_NOT_IMPLEMENTED;
 
   } else {
-    ContentChild::GetSingleton()->SendSetClipboardText(buffer,
-                                                    aTransferable->GetIsPrivateData(),
-                                                    aWhichClipboard);
+    ContentChild::GetSingleton()->SendSetClipboardText(buffer, aWhichClipboard);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsClipboard::GetData(nsITransferable *aTransferable, PRInt32 aWhichClipboard)
 {
--- a/widget/nsITransferable.idl
+++ b/widget/nsITransferable.idl
@@ -76,17 +76,17 @@ interface nsIFlavorDataProvider : nsISup
     * @param  aFlavor (in parameter) the flavor of data to retrieve
     * @param  aData the data. Some variant of class in nsISupportsPrimitives.idl
     * @param  aDataLen the length of the data
     */
   void getFlavorData(in nsITransferable aTransferable, in string aFlavor, out nsISupports aData, out unsigned long aDataLen);
 };
 
 
-[scriptable, uuid(5a611a60-e5b5-11e1-aff1-0800200c9a66)]
+[scriptable, uuid(983cb266-535b-4ca5-8ef2-2cee08d061e6)]
 interface nsITransferable : nsISupports
 {
   const long kFlavorHasDataProvider = 0;
 
   /**
    * Initializes a transferable object.  This should be called on all
    * transferable objects.  Failure to do so will result in fatal assertions in
    * debug builds.
@@ -167,17 +167,12 @@ interface nsITransferable : nsISupports
     * that goes along with it.
     *
     * @param  aDataFlavor a data flavor to remove
     */
   void removeDataFlavor ( in string aDataFlavor ) ;
 
   attribute nsIFormatConverter converter;
 
-  /**
-   * Use of the SetIsPrivateData() method generated by isPrivateData attribute should 
-   * be avoided as much as possible because the value set may not reflect the status 
-   * of the context in which the transferable was created.
-   */
-  [noscript] attribute boolean isPrivateData;
+  [noscript] readonly attribute boolean isPrivateData;
 
 };
 
--- a/widget/xpwidgets/nsTransferable.cpp
+++ b/widget/xpwidgets/nsTransferable.cpp
@@ -616,19 +616,8 @@ nsTransferable::GetIsPrivateData(bool *a
   MOZ_ASSERT(mInitialized);
 
   NS_ENSURE_ARG_POINTER(aIsPrivateData);
 
   *aIsPrivateData = mPrivateData;
 
   return NS_OK;
 }
-
-NS_IMETHODIMP
-nsTransferable::SetIsPrivateData(bool aIsPrivateData)
-{
-  MOZ_ASSERT(mInitialized);
-
-  mPrivateData = aIsPrivateData;
-
-  return NS_OK;
-}
-