[Webkit-unassigned] [Bug 188784] New: Wrong Reference Error Output

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Aug 21 04:50:01 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=188784

            Bug ID: 188784
           Summary: Wrong Reference Error Output
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: sunlili at ict.ac.cn

Executing following code :
----------------------------------------------------------
let testCases = [ function(){return 1;}, function(){return 2} ];
let passed = true;
const isFloatTest = true;
function makeArray(size = 10){
}
function makeSource(size = 10) {
}

for(let testCase of testCases) {
  let results = [];
  let testInfo = testCase();
  let src;
  if(!testInfo.makeSource) {
      src = makeSource(testInfo.end - testInfo.start);
  }
  function run(gen) {
    if(testInfo.makeSource) {
      src = testInfo.makeSource();
    }
  }
  run(makeArray);
}
if(passed) {
  print("PASSED");
} else {
  print("FAILED");
}
print("BT_FLAG");
-------------------------------------------------------

The output(ChakraCore, V8, SpiderMonkey) should be : 
PASSED
BT_FLAG

However, JavaScriptCore throws a Reference Error:
Exception: ReferenceError: Can't find variable: testInfo

BT_GROUP
2018/8/21

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180821/c1cdc374/attachment-0001.html>


More information about the webkit-unassigned mailing list