Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: Source/modules/permissions/Permissions.cpp

Issue 1233173002: Have ScriptPromiseResolver on the Oilpan heap always. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix webusb ScriptPromiseResolver usage Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/modules/permissions/Permissions.cpp
diff --git a/Source/modules/permissions/Permissions.cpp b/Source/modules/permissions/Permissions.cpp
index ae73fb2930f75c5724022c6a327a03e9d74d74e8..df5ba8fa65928e53e70bb319e6cfd660b4bd0e9c 100644
--- a/Source/modules/permissions/Permissions.cpp
+++ b/Source/modules/permissions/Permissions.cpp
@@ -28,7 +28,7 @@ namespace {
// Examples of behaviours which would go here are rejecting unsupported permissions, accepting
// permissions which are always granted or always denied according to the spec etc.
bool handleDefaultBehaviour(
- ScriptState* scriptState, const ScriptValue& rawPermission, PassRefPtr<ScriptPromiseResolver> resolver, WebPermissionType type, TrackExceptionState& exceptionState)
+ ScriptState* scriptState, const ScriptValue& rawPermission, ScriptPromiseResolver* resolver, WebPermissionType type, TrackExceptionState& exceptionState)
{
if (type == WebPermissionTypePushNotifications) {
PushPermissionDescriptor pushPermission = NativeValueTraits<PushPermissionDescriptor>::nativeValue(scriptState->isolate(), rawPermission.v8Value(), exceptionState);
@@ -91,7 +91,7 @@ ScriptPromise Permissions::query(ScriptState* scriptState, const ScriptValue& ra
if (exceptionState.hadException())
return ScriptPromise::reject(scriptState, v8::Exception::TypeError(v8String(scriptState->isolate(), exceptionState.message())));
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
String name = permission.name();
@@ -120,7 +120,7 @@ ScriptPromise Permissions::request(ScriptState* scriptState, const ScriptValue&
if (exceptionState.hadException())
return ScriptPromise::reject(scriptState, v8::Exception::TypeError(v8String(scriptState->isolate(), exceptionState.message())));
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
String name = permission.name();
@@ -145,7 +145,7 @@ ScriptPromise Permissions::revoke(ScriptState* scriptState, const ScriptValue& r
if (exceptionState.hadException())
return ScriptPromise::reject(scriptState, v8::Exception::TypeError(v8String(scriptState->isolate(), exceptionState.message())));
- RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState);
+ ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
String name = permission.name();
« no previous file with comments | « Source/modules/permissions/PermissionCallback.cpp ('k') | Source/modules/presentation/PresentationRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698