1. 09 Oct, 2015 1 commit
  2. 07 Oct, 2015 1 commit
    • caitpotter88's avatar
      [api] expose Array Iterators to API · 24aca870
      caitpotter88 authored
      Allow access to Array Iterator through the API, in order to simplify
      setting up interfaces which use these methods. This applies to
      WebIDL interfaces with "length" attributes returning integer types and
      a getter taking an unsigned long type.
      
      BUG=
      LOG=N
      R=adamk@chromium.org
      
      Review URL: https://codereview.chromium.org/1378403004
      
      Cr-Commit-Position: refs/heads/master@{#31152}
      24aca870
  3. 06 Oct, 2015 1 commit
  4. 05 Oct, 2015 1 commit
    • julien.gilli's avatar
      Add SetAbortOnUncaughtExceptionCallback API · 1ee712ab
      julien.gilli authored
      The --abort-on-uncaught-exception command line switch makes
      Isolate::Throw abort if the error being thrown cannot be caught by a
      try/catch block.
      
      Embedders may want to use other mechanisms than try/catch blocks to
      handle uncaught exceptions. For instance, Node.js has "domain" objects
      that have error handlers that can handle uncaught exception like
      following:
      
      var d = domain.create();
      
      d.on('error', function onError(err) {
        console.log('Handling error');
      });
      
      d.run(function() {
        throw new Error("boom");
      });
      
      These error handlers are called by isolates' message listeners.
      
      If --abort-on-uncaught-exception is *not* used, the isolate's
      message listener will be called, which will in turn call the domain's
      error handler. The process will output 'Handling error' and will exit
      successfully (not due to an uncaught exception). This is the behavior
      that Node.js users expect.
      
      However, if --abort-on-uncaught-exception is used and when throwing an
      error within a domain that has an error handler, the process will abort
      and the domain's error handler will not be called. This is not the
      behavior that Node.js users expect.
      
      Having a SetAbortOnUncaughtExceptionCallback API allows embedders to
      determine when it's not appropriate to abort and instead handle the
      exception via the isolate's message listener.
      
      In the example above, Node.js would set a custom callback with
      SetAbortOnUncaughtExceptionCallback that would be implemented as
      following (the sample code has been simplified to remove what's not
      relevant to this change):
      
      bool ShouldAbortOnUncaughtException(Isolate* isolate) {
        return !IsDomainActive();
      }
      
      Now when --abort-on-uncaught-exception is used, Isolate::Throw would
      call that callback and determine that it should not abort if a domain
      with an error handler is active. Instead, the isolate's message listener
      would be called and the error would be handled by the domain's error
      handler.
      
      I believe this can also be useful for other embedders.
      
      BUG=
      
      R=bmeurer@chromium.org
      
      Review URL: https://codereview.chromium.org/1375933003
      
      Cr-Commit-Position: refs/heads/master@{#31111}
      1ee712ab
  5. 01 Oct, 2015 1 commit
  6. 30 Sep, 2015 1 commit
  7. 29 Sep, 2015 4 commits
  8. 28 Sep, 2015 3 commits
  9. 23 Sep, 2015 1 commit
    • bmeurer's avatar
      [builtin] Refactor Invoke to deal with any kind of callable. · 634d1d86
      bmeurer authored
      Now both Execution::Call and Execution::New can deal with any
      kind of target and will raise a proper exception if the target is not
      callable (which is not yet spec compliant for New, as we would
      have to check IsConstructor instead, which we don't have yet).
      
      Now we no longer need to do any of these weird call/construct
      delegate gymnastics in C++, and we finally have a single true
      bottleneck for Call/Construct abstract operations in the code
      base, with only a few special handlings left in the compilers to
      optimize the JSFunction case.
      
      R=jarin@chromium.org
      BUG=v8:4430, v8:4413
      LOG=n
      
      Review URL: https://codereview.chromium.org/1360793002
      
      Cr-Commit-Position: refs/heads/master@{#30874}
      634d1d86
  10. 17 Sep, 2015 3 commits
  11. 15 Sep, 2015 1 commit
    • bmeurer's avatar
      [runtime] Replace the EQUALS builtin with proper Object::Equals. · 54bab695
      bmeurer authored
      Move the implementation of the Abstract Equality Comparison to the
      runtime and thereby remove the EQUALS dispatcher builtin. Also remove
      the various runtime entry points that were only used to support the
      EQUALS builtin.
      
      Now the Abstract Equality Comparison is also using the correct
      ToPrimitive implementation, which properly supports @@toPrimitive.
      
      CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg
      R=mstarzinger@chromium.org
      BUG=v8:4307
      LOG=n
      
      Review URL: https://codereview.chromium.org/1337993005
      
      Cr-Commit-Position: refs/heads/master@{#30747}
      54bab695
  12. 10 Sep, 2015 2 commits
  13. 07 Sep, 2015 1 commit
  14. 03 Sep, 2015 1 commit
    • bmeurer's avatar
      [es6] Initial steps towards a correct implementation of IsCallable. · 8a378f46
      bmeurer authored
      This turns the has_instance_call_handler bit on Map into an is_callable
      bit, that matches the spec definition of IsCallable (i.e. instances have
      [[Call]] internal methods).
      
      Also fix the typeof operator to properly say "function" for everything
      that is callable.
      
      Also remove the (unused) premature %_GetPrototype optimization from
      Crankshaft, which just complicated the Map bit swap.
      
      R=mstarzinger@chromium.org, rossberg@chromium.org, yangguo@chromium.org
      CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg
      
      Review URL: https://codereview.chromium.org/1316933002
      
      Cr-Commit-Position: refs/heads/master@{#30552}
      8a378f46
  15. 02 Sep, 2015 1 commit
  16. 01 Sep, 2015 1 commit
  17. 31 Aug, 2015 3 commits
  18. 28 Aug, 2015 1 commit
    • bmeurer's avatar
      [es6] Implement spec compliant ToPrimitive in the runtime. · f6c6d713
      bmeurer authored
      This is the first step towards a spec compliant ToPrimitive
      implementation (and therefore spec compliant ToNumber, ToString,
      ToName, and friends).  It adds support for the @@toPrimitive
      symbol that was introduced with ES2015, and also adds the new
      Symbol.prototype[@@toPrimitive] and Date.prototype[@@toPrimitive]
      initial properties.
      
      There are now runtime functions for %ToPrimitive, %ToNumber and
      %ToString, which do the right thing and should be used as fallbacks
      instead of the hairy runtime.js implementations.  I will do the
      same for the other conversion operations mentioned by the spec in
      follow up CLs.  Once everything is in place we can look into
      optimizing things further, so that we don't always call into the
      runtime.
      
      Also fixed Date.prototype.toJSON to be spec compliant.
      
      R=mstarzinger@chromium.org, yangguo@chromium.org
      BUG=v8:4307
      LOG=y
      
      Review URL: https://codereview.chromium.org/1306303003
      
      Cr-Commit-Position: refs/heads/master@{#30434}
      f6c6d713
  19. 27 Aug, 2015 2 commits
  20. 26 Aug, 2015 4 commits
  21. 21 Aug, 2015 1 commit
  22. 19 Aug, 2015 3 commits
  23. 18 Aug, 2015 2 commits