ryanackley avatar ryanackley committed 096ef82

Fixes issues in Chrome Canaray with BlobBuilder going away

Comments (0)

Files changed (2)

FauxFilesystem.js

 				//	jsArray[i] = byteArray[i];
 				//}
 				
-				var bytes = new Int8Array(byteArray);
-				
-				blob = bytes.buffer;
-				//blob.size = size;
-			
+				blob = new Int8Array(byteArray);
+										
 			}
 			else{
-				blob = new ArrayBuffer();
+				blob = new Int8Array(0);
 				//blob.size= 0;
 			}
-			var bb = new BlobBuilder();
-			bb.append(blob);
-			var b = bb.getBlob();
+			var b = new Blob([blob]);
 			b.size = size;
 			success(b);
 			
 		root.root = root;
 		successCallback(root);
 	}
-	window.BlobBuilder = WebKitBlobBuilder;
+	
 }else{
 	window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
-}
-if (!window.BlobBuilder){
-	window.BlobBuilder = WebKitBlobBuilder;
 }
 					if (callback)
 						callback();
 				}
-				var bb = new BlobBuilder();
-				bb.append(contents);
-				writer.write(bb.getBlob());
+				if (typeof contents === "ArrayBuffer"){
+					contents = new Uint8Array(contents);
+				}
+				writer.write(new Blob([contents]));
 			});
 		});
 	}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.