refactor: ginify Tray (#22822)
* refactor: ginify Tray * lint * improve argument parsing logic * remove redundant imports from tray.js * new Tray produces an instanceof Tray * make Constructible generic * lint * clean up on exit
This commit is contained in:
parent
76ae3b7ecb
commit
a3e28788ce
16 changed files with 380 additions and 88 deletions
27
shell/common/gin_helper/cleaned_up_at_exit.h
Normal file
27
shell/common/gin_helper/cleaned_up_at_exit.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
// Copyright (c) 2020 Slack Technologies, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_
|
||||
#define SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_
|
||||
|
||||
namespace gin_helper {
|
||||
|
||||
// Objects of this type will be destroyed immediately prior to disposing the V8
|
||||
// Isolate. This should only be used for gin::Wrappable objects, whose lifetime
|
||||
// is otherwise managed by V8.
|
||||
//
|
||||
// NB. This is only needed because v8::Global objects that have SetWeak
|
||||
// finalization callbacks do not have their finalization callbacks invoked at
|
||||
// Isolate teardown.
|
||||
class CleanedUpAtExit {
|
||||
public:
|
||||
CleanedUpAtExit();
|
||||
virtual ~CleanedUpAtExit();
|
||||
|
||||
static void DoCleanup();
|
||||
};
|
||||
|
||||
} // namespace gin_helper
|
||||
|
||||
#endif // SHELL_COMMON_GIN_HELPER_CLEANED_UP_AT_EXIT_H_
|
Loading…
Add table
Add a link
Reference in a new issue