File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -426,13 +426,16 @@ webdriver.stacktrace.OPERA_STACK_FRAME_REGEXP_ = new RegExp('^' +
426
426
427
427
/**
428
428
* RegExp pattern for function call in a Chakra (IE) stack trace. This
429
- * expression allows for identifiers like 'Anonymous function', 'eval code',
430
- * and 'Global code'.
429
+ * expression creates 2 submatches on the (optional) context and function name,
430
+ * matching identifiers like 'foo.Bar.prototype.baz', 'Anonymous function',
431
+ * 'eval code', and 'Global code'.
431
432
* @private {string}
432
433
* @const
433
434
*/
434
- webdriver . stacktrace . CHAKRA_FUNCTION_CALL_PATTERN_ = '(' +
435
- webdriver . stacktrace . IDENTIFIER_PATTERN_ + '(?:\\s+\\w+)*)' ;
435
+ webdriver . stacktrace . CHAKRA_FUNCTION_CALL_PATTERN_ =
436
+ '(?:(' + webdriver . stacktrace . IDENTIFIER_PATTERN_ +
437
+ '(?:\\.' + webdriver . stacktrace . IDENTIFIER_PATTERN_ + ')*)\\.)?' +
438
+ '(' + webdriver . stacktrace . IDENTIFIER_PATTERN_ + '(?:\\s+\\w+)*)' ;
436
439
437
440
438
441
/**
@@ -518,7 +521,7 @@ webdriver.stacktrace.parseStackFrame_ = function(frameStr) {
518
521
519
522
m = frameStr . match ( webdriver . stacktrace . CHAKRA_STACK_FRAME_REGEXP_ ) ;
520
523
if ( m ) {
521
- return new webdriver . stacktrace . Frame ( '' , m [ 1 ] , '' , m [ 2 ] ) ;
524
+ return new webdriver . stacktrace . Frame ( m [ 1 ] , m [ 2 ] , '' , m [ 3 ] ) ;
522
525
}
523
526
524
527
if ( frameStr == webdriver . stacktrace . UNKNOWN_CLOSURE_FRAME_ ||
You can’t perform that action at this time.
0 commit comments