tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

member-identifier-reference-undefined.js (664B)


      1 // Copyright (C) 2021 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-delete-operator
      6 description: Delete Operator throws an error if the base reference is not object-coercible (undefined).
      7 info: |
      8  # 12.5.3.2 Runtime Semantics: Evaluation
      9  UnaryExpression : delete UnaryExpression
     10 
     11  [...]
     12  5. If IsPropertyReference(ref) is true, then
     13     a. If IsSuperReference(ref) is true, throw a ReferenceError exception.
     14     b. Let baseObj be ? ToObject(ref.[[Base]]).
     15 ---*/
     16 
     17 var base = undefined;
     18 
     19 assert.throws(TypeError, function() {
     20  delete base.prop;
     21 });
     22 
     23 reportCompare(0, 0);