1. 12 Apr, 2017 1 commit
    • Ken Rockot's avatar
      Prevent gin from recreating wrappers after GC · 2b0f0765
      Ken Rockot authored
      This changes gin::Wrappable to track its cleanup
      state in order to prevent async operations from
      recreating a wrapper between first and second weak
      callbacks.
      
      GetWrapper is changed to return a MaybeLocal,
      and callers are updated accordingly; checking
      in some cases and failing gracefully in others.
      
      Mojo JS's WaitingCallback is changed to silently
      ignore handle notifications if its wrapper is
      no longer alive.
      
      BUG=707689
      
      Change-Id: I3fc11a24209f0ef35bfa18556f5734c4b18ae229
      Reviewed-on: https://chromium-review.googlesource.com/475077
      Commit-Queue: Ken Rockot <rockot@chromium.org>
      Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
      Cr-Commit-Position: refs/heads/master@{#464134}
      2b0f0765
  2. 31 Aug, 2016 1 commit
  3. 11 Jun, 2015 1 commit
  4. 02 Jun, 2015 1 commit
    • bashi's avatar
      Re-land: gin: Use V8 Maybe APIs · dbd2ef9b
      bashi authored
      The previous CL was reverted because it broke layout tests.
      
      Cause:
      GetKeyModifiersFromV8() in test_runner/event_sender.cc passes
      NULL as v8::Isolate*, which is cleary wrong. Pass
      blink::mainThreadIsolate() as the other callsites do.
      
      BUG=479439
      
      Review URL: https://codereview.chromium.org/1152653004
      
      Cr-Commit-Position: refs/heads/master@{#332312}
      dbd2ef9b
  5. 29 May, 2015 2 commits
  6. 30 Apr, 2015 1 commit
  7. 22 Apr, 2015 1 commit
  8. 28 Feb, 2014 1 commit
  9. 19 Dec, 2013 1 commit
  10. 17 Dec, 2013 1 commit
  11. 08 Dec, 2013 1 commit
  12. 06 Dec, 2013 2 commits
  13. 05 Dec, 2013 1 commit
  14. 27 Nov, 2013 1 commit
  15. 25 Nov, 2013 1 commit
  16. 21 Nov, 2013 1 commit
    • abarth@chromium.org's avatar
      [Gin] Add a mechanism for wrapping C++ object · 93f9f360
      abarth@chromium.org authored
      This CL adds a mechanism for wrapping C++ objects to Gin. The approach in this
      CL is similar to Blink's ScriptWrappable class, with a couple of differences:
      
      1) gin::Wrappable has a vtable whereas Blink's ScriptWrappable class does not.
         Having a vtable in this base class lets us simplify a large number of
         concerns. We've talked about adding a vtable to ScriptWrappable but have
         avoided it because Blink creates many thousands of wrapped objects. When we
         refactor Blink to use Gin, we can still support the non-vtable approach, but
         most clients of Gin will want the simpler approach.
      
      2) In Gin, we've bound together the notion of being reference counted with the
         notion of being wrappable from JavaScript. In Blink, those concepts are
         separate because we don't want to introduce a virtual destructor for
         ScriptWrappable. However, because gin::Wrappable already has a vtable,
         adding a virtual destructor is relatively cheap.
      
      Actually wrapping a C++ object still takes too much typing, but we can improve
      that in future CLs.
      
      R=jochen@chromium.org
      BUG=317398
      
      Review URL: https://codereview.chromium.org/79203004
      
      git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236555 0039d316-1c4b-4281-b951-d872f2087c98
      93f9f360