Closed Bug 412280 Opened 14 years ago Closed 14 years ago

nsGnomeVFSInputStream::DoOpen probably shouldn't treat values other than GNOME_VFS_OK from gnome_vfs_get_file_info as OK

Categories

(Core :: Networking, defect)

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

Attachments

(1 file)

Starting program: /home/mozilla/host-opt-firefox-i686-pc-linux-gnu/dist/bin/xpcshell
Breakpoint 1 at 0xb790a737: file /home/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp, line 426.
js> load('/home/mozilla/tools/test-harness/xpcshell-simple/head.js');
js> load('/home/mozilla/tools/test-harness/xpcshell-simple/tail.js');
js> load('/home/mozilla/netwerk/test/unit/head_channels.js')
js> function make_channel(url, callback, ctx) {
 return Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService).newChannel(url, "", null);
}

js> function callback(request, buffer, ctx) {
  print ("hello.js\n");
  print(request,'\n',buffer);
  print ("\nworld\n");
  do_test_finished();
}
js> function run_test() {
  do_check_eq(57, 57)
  do_check_neq(1, 2)
  do_check_true(true);

  do_test_pending();
  do_timeout(100, "do_test_finished();");
  var smb=make_channel('smb://something/test/Log.txt');
  smb.asyncOpen(new ChannelListener(callback, null, null), null);
}
js> _execute_test();
*** test pending
*** test pending
*** test finished
*** running event loop
[New LWP 1906]
[Switching to LWP 1906]

Breakpoint 1, nsGnomeVFSInputStream::DoOpen (this=0xb7e3ea10)
    at /home/mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp:426
426       GnomeVFSFileInfo info = {0};
(gdb) n
401     {
(gdb)
410       gnome_vfs_module_callback_push(GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION,
(gdb)
401     {
(gdb)
*** test finished
*** exiting
*** PASS ***
js> 410   gnome_vfs_module_callback_push(GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION,
(gdb)
401     {
(gdb)
410       gnome_vfs_module_callback_push(GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION,
(gdb)
426       GnomeVFSFileInfo info = {0};
(gdb)
427       rv = gnome_vfs_get_file_info(mSpec.get(), &info, GNOME_VFS_FILE_INFO_DEFAULT);
(gdb)
Couldn't get main dbus connection: Failed to execute dbus-launch to autolaunch D-Bus session
428       if (rv == GNOME_VFS_OK && info.type == GNOME_VFS_FILE_TYPE_DIRECTORY)
(gdb) p rv
$2 = 3055509632
(gdb) p (int)GNOME_VFS_OK
$3 = 0
(gdb) n
438         rv = gnome_vfs_open(&mHandle, mSpec.get(), GNOME_VFS_OPEN_READ);
(gdb) n
Couldn't get main dbus connection: Failed to execute dbus-launch to autolaunch D-Bus session
444       gnome_vfs_module_callback_pop(GNOME_VFS_MODULE_CALLBACK_AUTHENTICATION);
(gdb) p rv
$4 = GNOME_VFS_ERROR_INTERNAL

--
Coincidentally, while I was writing a writer implementation for this file, I happened to write the parallel code not to behave the way that this code behaves.
Assignee: nobody → timeless
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #297653 - Flags: review?(cbiesinger)
Attachment #297653 - Flags: review?(cbiesinger) → review+
Attachment #297653 - Flags: approval1.9?
Comment on attachment 297653 [details] [diff] [review]
only continue for GNOME_VFS_OK

a1.9+=damons
Attachment #297653 - Flags: approval1.9? → approval1.9+
Attachment #297653 - Flags: approval1.9b3?
Comment on attachment 297653 [details] [diff] [review]
only continue for GNOME_VFS_OK

It'll have to wait for the next beta, sorry.
Attachment #297653 - Flags: approval1.9b3? → approval1.9b3-
Comment on attachment 297653 [details] [diff] [review]
only continue for GNOME_VFS_OK

mozilla/extensions/gnomevfs/nsGnomeVFSProtocolHandler.cpp 	1.15
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.