| Index: sky/engine/bindings-dart/common/ScriptValue.cpp
|
| diff --git a/sky/engine/public/web/WebLeakDetector.h b/sky/engine/bindings-dart/common/ScriptValue.cpp
|
| similarity index 61%
|
| copy from sky/engine/public/web/WebLeakDetector.h
|
| copy to sky/engine/bindings-dart/common/ScriptValue.cpp
|
| index 36d28d8cec056d0868bafb2dc8de6453f032699c..f88193903a18cada0b097e8eaaf3adc7d6f7b30c 100644
|
| --- a/sky/engine/public/web/WebLeakDetector.h
|
| +++ b/sky/engine/bindings-dart/common/ScriptValue.cpp
|
| @@ -28,38 +28,48 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef SKY_ENGINE_PUBLIC_WEB_WEBLEAKDETECTOR_H_
|
| -#define SKY_ENGINE_PUBLIC_WEB_WEBLEAKDETECTOR_H_
|
| +#include "config.h"
|
| +#include "bindings/common/ScriptValue.h"
|
|
|
| -#include "sky/engine/public/platform/WebCommon.h"
|
| -#include "sky/engine/public/web/WebFrame.h"
|
| +#include "modules/indexeddb/IDBKey.h"
|
| +#include "modules/indexeddb/IDBKeyRange.h"
|
| +#include "platform/JSONValues.h"
|
|
|
| namespace blink {
|
|
|
| -class WebLeakDetectorClient {
|
| -public:
|
| - struct Result {
|
| - unsigned numberOfLiveAudioNodes;
|
| - unsigned numberOfLiveDocuments;
|
| - unsigned numberOfLiveNodes;
|
| - unsigned numberOfLiveRenderObjects;
|
| - unsigned numberOfLiveResources;
|
| - };
|
| +PassRefPtr<JSONValue> ScriptValue::toJSONValue(ScriptState* state) const
|
| +{
|
| + return m_implScriptValue->toJSONValue(state);
|
| +}
|
|
|
| - virtual void onLeakDetectionComplete(const Result&) = 0;
|
| -};
|
| +ScriptPromise ScriptValue::toPromise() const
|
| +{
|
| + return ScriptPromise(m_implScriptValue->toPromise());
|
| +}
|
|
|
| -class WebLeakDetector {
|
| -public:
|
| - virtual ~WebLeakDetector() { }
|
| +ScriptPromise ScriptValue::toRejectedPromise() const
|
| +{
|
| + return ScriptPromise(m_implScriptValue->toRejectedPromise());
|
| +}
|
|
|
| - BLINK_EXPORT static WebLeakDetector* create(WebLeakDetectorClient*);
|
| +IDBKey* ScriptValue::createIDBKeyFromKeyPath(const IDBKeyPath& keyPath) const
|
| +{
|
| + return m_implScriptValue->createIDBKeyFromKeyPath(keyPath);
|
| +}
|
|
|
| - // Cleans up the DOM objects and counts them. |WebLeakDetectorClient::onLeakDetectionComplete()| is called when done.
|
| - // This is supposed to be used for detecting DOM-object leaks.
|
| - virtual void collectGarbageAndGetDOMCounts(WebLocalFrame*) = 0;
|
| -};
|
| +bool ScriptValue::canInjectIDBKey(const IDBKeyPath& keyPath) const
|
| +{
|
| + return m_implScriptValue->canInjectIDBKey(keyPath);
|
| +}
|
|
|
| -} // namespace blink
|
| +IDBKey* ScriptValue::toIDBKey() const
|
| +{
|
| + return m_implScriptValue->toIDBKey();
|
| +}
|
| +
|
| +IDBKeyRange* ScriptValue::toIDBKeyRange() const
|
| +{
|
| + return m_implScriptValue->toIDBKeyRange();
|
| +}
|
|
|
| -#endif // SKY_ENGINE_PUBLIC_WEB_WEBLEAKDETECTOR_H_
|
| +} // namespace blink
|
|
|