I experience this problem once every other week. Last few errors: [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) (anonymous function) (codemirror.js, line 1994) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) runInOp (codemirror.js, line 1986) highlightWorker (codemirror.js, line 1398) (anonymous function) (codemirror.js, line 7089) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) (anonymous function) (codemirror.js, line 1994) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) readInput (codemirror.js, line 2312) p (codemirror.js, line 2223) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) runInOp (codemirror.js, line 1986) highlightWorker (codemirror.js, line 1398) (anonymous function) (codemirror.js, line 7089) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) readInput (codemirror.js, line 2312) p (codemirror.js, line 2223) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) (anonymous function) (codemirror.js, line 1994) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) runInOp (codemirror.js, line 1986) highlightWorker (codemirror.js, line 1398) (anonymous function) (codemirror.js, line 7089) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) readInput (codemirror.js, line 2312) p (codemirror.js, line 2223) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) runInOp (codemirror.js, line 1986) highlightWorker (codemirror.js, line 1398) (anonymous function) (codemirror.js, line 7089) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) readInput (codemirror.js, line 2312) p (codemirror.js, line 2223) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) runInOp (codemirror.js, line 1986) highlightWorker (codemirror.js, line 1398) (anonymous function) (codemirror.js, line 7089) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) patchDisplay (codemirror.js, line 761) updateDisplayInner (codemirror.js, line 633) updateDisplay (codemirror.js, line 549) endOperation (codemirror.js, line 1926) (anonymous function) (codemirror.js, line 1994) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) runInOp (codemirror.js, line 1986) highlightWorker (codemirror.js, line 1398) (anonymous function) (codemirror.js, line 7089) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) cont (javascript.js, line 265) maybeoperatorNoComma (javascript.js, line 401) maybeoperatorComma (javascript.js, line 386) parseJS (javascript.js, line 248) token (javascript.js, line 610) extendedToken (CodeMirrorAdditions.js, line 235) readToken (codemirror.js, line 5620) runMode (codemirror.js, line 5640) highlightLine (codemirror.js, line 5669) getLineStyles (codemirror.js, line 5704) buildLineContent (codemirror.js, line 5762) getLineContent (codemirror.js, line 822) updateLineText (codemirror.js, line 830) updateLineForChanges (codemirror.js, line 780) prepareMeasureForLine (codemirror.js, line 1548) measureChar (codemirror.js, line 1525) charCoords (codemirror.js, line 1732) coords (codemirror.js, line 1317) (anonymous function) (codemirror.js, line 1321) iterateBidiSections (codemirror.js, line 7323) drawForLine (codemirror.js, line 1320) drawSelectionRange (codemirror.js, line 1350) updateSelection (codemirror.js, line 1259) endOperation (codemirror.js, line 1930) (anonymous function) (codemirror.js, line 1994) [Error] TypeError: pass.apply is not a function. (In 'pass.apply(null, arguments)', 'pass.apply' is undefined) (anonymous function) (codemirror.js, line 1994)
<rdar://problem/20427980>
Created attachment 250142 [details] Screencast
I've been seeing this as well. This is a serious issue. It is likely surfacing because we have moved a lot of our code to ES6 classes which made them strict mode, so this may have been a pre-existing issue in JSC. Given the unusual nature of the runtime error, because the code in the immediate vicinity appears valid and straightforward, it makes me think this is a JavaScriptCore issue. If we can come up with really solid steps to reproduce, we should be able to verify it is caused by JIT/DFG/FTL, create a reduction, and pass off to JavaScriptCore engineers.
Created attachment 250409 [details] [TEST] Test Case Test case for reproducing.
With a reproducible test I bisected this to: r181993 http://trac.webkit.org/changeset/181993 * STEPS TO REPRODUCE 1. Open attached HTML test case 2. Open Inspector and view the html Source Code (triggers CodeMirror code highlighting) => Uncaught exceptions in Inspector Window, visible by inspecting the inspector * NOTES - Disabling the JIT (JSC_useJIT=0) this doesn't reproduce, so seems JIT related - I'll see if I can create a reduction or something since on its own, this isn't very useful.
<rdar://problem/20415532> This issue happens to be a dup of a bug that was already tracked by <rdar://problem/20415532>. Will relate this bug to that rdar.
Created attachment 250585 [details] the patch.
Thanks for the review. Landed in r182745: <http://trac.webkit.org/r182745>.
👍