Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369007

Summary: Navigator error in Safari
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Project Inbox <orion.client-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 0.4   
Target Milestone: 0.4 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2012-01-18 16:20:01 EST
There is an implementation of Function.prototype.bind in editor.js. It is injected into Function.prototype as a patch for browsers that don't support bind (namely, Safari).

Since bind() is now required by the Navigator code, this patch should be moved into common code that's used by the navigator as well.

Note: bug 369004 currently prevents you from seeing this issue, since editor.js is pulled in by the navigator. Once that's fixed, bind() will not be injected and the navigator will blow up in Safari like so:

Error
  line: 888
  message: "'undefined' is not a function (evaluating 'uriTemplate.expand.bind(uriTemplate)')"
  sourceURL: "http://localhost:8080/orion/fileCommands.js"
Comment 1 Mark Macdonald CLA 2012-01-23 17:22:21 EST
Disregard the suggestion in Comment 0... it's easier to just use dojo.hitch in this case. bind can be moved later if it's needed by more dojoless code.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=aba4b30218fac777dd6616e167eb459745c232c6