Backout changeset 3985e7570ab6 (Bug 673301) due to permaorange in M1 (OSX).
authorMarco Bonardo <mbonardo@mozilla.com>
Sat, 06 Aug 2011 00:23:51 +0200
changeset 73931 5e542afdd814fab0341b1991a8334e32021dd7d2
parent 73930 672300c1bf65aede27bb2bc18479bcb4363ca7b2
child 73932 9ef8e264cd4129ba2b6969496bc4ebc329cd2313
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
bugs673301
milestone8.0a1
backs out3985e7570ab65a24576bb8ead0286d5c810b0167
Backout changeset 3985e7570ab6 (Bug 673301) due to permaorange in M1 (OSX).
widget/src/cocoa/nsClipboard.mm
widget/tests/Makefile.in
widget/tests/test_bug673301.xul
--- a/widget/src/cocoa/nsClipboard.mm
+++ b/widget/src/cocoa/nsClipboard.mm
@@ -423,18 +423,16 @@ nsClipboard::PasteboardDictFromTransfera
     NSString *pboardType = nil;
 
     if (nsClipboard::IsStringType(flavorStr, &pboardType)) {
       void* data = nsnull;
       PRUint32 dataSize = 0;
       nsCOMPtr<nsISupports> genericDataWrapper;
       rv = aTransferable->GetTransferData(flavorStr, getter_AddRefs(genericDataWrapper), &dataSize);
       nsPrimitiveHelpers::CreateDataFromPrimitive(flavorStr, genericDataWrapper, &data, dataSize);
-      if (!data)
-        continue;
       
       NSString* nativeString = [NSString stringWithCharacters:(const unichar*)data length:(dataSize / sizeof(PRUnichar))];
       // be nice to Carbon apps, normalize the receiver's contents using Form C.
       nativeString = [nativeString precomposedStringWithCanonicalMapping];
 
       [pasteboardOutputDict setObject:nativeString forKey:pboardType];
       
       nsMemory::Free(data);
--- a/widget/tests/Makefile.in
+++ b/widget/tests/Makefile.in
@@ -105,17 +105,16 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
                test_platform_colors.xul \
                test_standalone_native_menu.xul \
                standalone_native_menu_window.xul \
                test_bug586713.xul \
                bug586713_window.xul \
                test_key_event_counts.xul \
                test_bug596600.xul \
                window_bug596600.xul \
-               test_bug673301.xul \
                $(NULL)
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 _CHROME_FILES  += taskbar_previews.xul \
 		window_state_windows.xul \
 		taskbar_progress.xul \
 		test_chrome_context_menus_win.xul \
deleted file mode 100644
--- a/widget/tests/test_bug673301.xul
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0"?>
-<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
-<?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css"
-                 type="text/css"?>
-
-<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-<script type="application/javascript" src="chrome://mochikit/content/MochiKit/packed.js"/>
-<script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
-
-<body  xmlns="http://www.w3.org/1999/xhtml">
-<p id="display"></p>
-<div id="content" style="display: none"/>
-</body>
-
-<script type="application/javascript">
-var clipboard = Components.classes["@mozilla.org/widget/clipboard;1"]
-                          .getService(Components.interfaces.nsIClipboard);
-
-var transferable = Components.classes['@mozilla.org/widget/transferable;1']
-                             .createInstance(Components.interfaces.nsITransferable);
-
-transferable.addDataFlavor("text/unicode");
-transferable.setTransferData("text/unicode", document, 4);
-
-clipboard.setData(transferable, null, Components.interfaces.nsIClipboard.kGlobalClipboard);
-
-SimpleTest.ok(true, "Didn't crash setting non-text data for text/unicode type");
-</script>
-</window>