+2013-02-28 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r144126 and r144176.
+ http://trac.webkit.org/changeset/144126
+ http://trac.webkit.org/changeset/144176
+ https://bugs.webkit.org/show_bug.cgi?id=111096
+
+ Caused fast/notifications/notifications-request-
+ permission.html to crash (Requested by abarth on #webkit).
+
+ * fast/notifications/notifications-request-permission-optional-expected.txt: Removed.
+ * fast/notifications/notifications-request-permission-optional.html: Removed.
+
2013-02-28 Nate Chapin <japhet@chromium.org>
Test for https://bugs.webkit.org/show_bug.cgi?id=110482
+++ /dev/null
-PASS window.webkitNotifications is not undefined
-PASS window.webkitNotifications.requestPermission() did not throw exception.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+++ /dev/null
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../js/resources/js-test-pre.js"></script>
-<script type="text/javascript">
-shouldNotBe('window.webkitNotifications', 'undefined');
-shouldNotThrow('window.webkitNotifications.requestPermission()');
-</script>
-<script src="../js/resources/js-test-post.js"></script>
-</head>
-</html>
+2013-02-28 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r144126 and r144176.
+ http://trac.webkit.org/changeset/144126
+ http://trac.webkit.org/changeset/144176
+ https://bugs.webkit.org/show_bug.cgi?id=111096
+
+ Caused fast/notifications/notifications-request-
+ permission.html to crash (Requested by abarth on #webkit).
+
+ * GNUmakefile.list.am:
+ * Modules/notifications/Notification.h:
+ (Notification):
+ * Modules/notifications/Notification.idl:
+ * Target.pri:
+ * UseJSC.cmake:
+ * UseV8.cmake:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSNotificationCustom.cpp: Added.
+ (WebCore):
+ (WebCore::JSNotification::requestPermission):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (GenerateParametersCheck):
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ * bindings/v8/custom/V8NotificationCustom.cpp: Added.
+ (WebCore):
+ (WebCore::V8Notification::requestPermissionMethodCustom):
+
2013-02-28 Nate Chapin <japhet@chromium.org>
Crash in CachedRawResource::responseReceived().
Source/WebCore/bindings/js/JSNodeFilterCustom.cpp \
Source/WebCore/bindings/js/JSNodeIteratorCustom.cpp \
Source/WebCore/bindings/js/JSNodeListCustom.cpp \
+ Source/WebCore/bindings/js/JSNotificationCustom.cpp \
Source/WebCore/bindings/js/JSOscillatorNodeCustom.cpp \
Source/WebCore/bindings/js/JSPannerNodeCustom.cpp \
Source/WebCore/bindings/js/JSPerformanceEntryCustom.cpp \
#if ENABLE(NOTIFICATIONS)
static const String& permission(ScriptExecutionContext*);
static const String& permissionString(NotificationClient::Permission);
- static void requestPermission(ScriptExecutionContext*, PassRefPtr<NotificationPermissionCallback> = 0);
+ static void requestPermission(ScriptExecutionContext*, PassRefPtr<NotificationPermissionCallback>);
#endif
private:
#if defined(ENABLE_NOTIFICATIONS) && ENABLE_NOTIFICATIONS
static readonly attribute [CallWith=ScriptExecutionContext] DOMString permission;
- [CallWith=ScriptExecutionContext] static void requestPermission(in [Optional, Callback] NotificationPermissionCallback callback);
+ [Custom] static void requestPermission(in NotificationPermissionCallback callback);
#endif
attribute EventListener onshow;
bindings/js/JSNodeFilterCustom.cpp \
bindings/js/JSNodeIteratorCustom.cpp \
bindings/js/JSNodeListCustom.cpp \
+ bindings/js/JSNotificationCustom.cpp \
bindings/js/JSPluginElementFunctions.cpp \
bindings/js/JSPopStateEventCustom.cpp \
bindings/js/JSProcessingInstructionCustom.cpp \
bindings/js/JSNodeFilterCustom.cpp
bindings/js/JSNodeIteratorCustom.cpp
bindings/js/JSNodeListCustom.cpp
+ bindings/js/JSNotificationCustom.cpp
bindings/js/JSPluginElementFunctions.cpp
bindings/js/JSPopStateEventCustom.cpp
bindings/js/JSProcessingInstructionCustom.cpp
if (ENABLE_NOTIFICATIONS)
list(APPEND WebCore_SOURCES
bindings/js/JSDesktopNotificationsCustom.cpp
+ bindings/js/JSNotificationCustom.cpp
)
endif ()
bindings/v8/custom/V8NamedNodesCollection.cpp
bindings/v8/custom/V8NodeCustom.cpp
bindings/v8/custom/V8NodeListCustom.cpp
+ bindings/v8/custom/V8NotificationCustom.cpp
bindings/v8/custom/V8NotificationCenterCustom.cpp
bindings/v8/custom/V8OscillatorNodeCustom.cpp
bindings/v8/custom/V8PerformanceEntryCustom.cpp
'bindings/v8/custom/V8NamedNodesCollection.h',
'bindings/v8/custom/V8NodeCustom.cpp',
'bindings/v8/custom/V8NodeListCustom.cpp',
+ 'bindings/v8/custom/V8NotificationCustom.cpp',
'bindings/v8/custom/V8NotificationCenterCustom.cpp',
'bindings/v8/custom/V8OscillatorNodeCustom.cpp',
'bindings/v8/custom/V8PannerNodeCustom.cpp',
</FileConfiguration>
</File>
<File
+ RelativePath="..\bindings\js\JSNotificationCustom.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_Cairo_CFLite|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release_Cairo_CFLite|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug_All|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Production|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\bindings\js\JSPluginElementFunctions.cpp"
>
<FileConfiguration
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
</ClCompile>
+ <ClCompile Include="..\bindings\js\JSNotificationCustom.cpp">
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+ <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
+ </ClCompile>
<ClCompile Include="..\bindings\js\JSPluginElementFunctions.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
<ClCompile Include="..\bindings\js\JSNodeListCustom.cpp">
<Filter>bindings\js</Filter>
</ClCompile>
+ <ClCompile Include="..\bindings\js\JSNotificationCustom.cpp">
+ <Filter>bindings\js</Filter>
+ </ClCompile>
<ClCompile Include="..\bindings\js\JSPluginElementFunctions.cpp">
<Filter>bindings\js</Filter>
</ClCompile>
<Filter>rendering</Filter>
</CustomBuildStep>
</ItemGroup>
-</Project>
+</Project>
\ No newline at end of file
31FB1A66120A5D3F00DC02A0 /* JSDeviceMotionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31FB1A64120A5D3F00DC02A0 /* JSDeviceMotionEvent.h */; };
31FB1A6C120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31FB1A6B120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp */; };
31FE6DFA15004C2A0004EBC4 /* NotificationPermissionCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 31EC1DAC14FF26EA00C94662 /* NotificationPermissionCallback.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ 31FE6E6D1501A3BF0004EBC4 /* JSNotificationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31FE6E6C1501A3BF0004EBC4 /* JSNotificationCustom.cpp */; };
3314ACEB10892086000F0E56 /* JSExceptionBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3314ACE910892086000F0E56 /* JSExceptionBase.cpp */; };
3314ACEC10892086000F0E56 /* JSExceptionBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 3314ACEA10892086000F0E56 /* JSExceptionBase.h */; };
33503C9A10179A74003B47E1 /* NotificationClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 33503C9910179A74003B47E1 /* NotificationClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
31FB1A63120A5D3F00DC02A0 /* JSDeviceMotionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceMotionEvent.cpp; sourceTree = "<group>"; };
31FB1A64120A5D3F00DC02A0 /* JSDeviceMotionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDeviceMotionEvent.h; sourceTree = "<group>"; };
31FB1A6B120A5D6900DC02A0 /* JSDeviceMotionEventCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDeviceMotionEventCustom.cpp; sourceTree = "<group>"; };
+ 31FE6E6C1501A3BF0004EBC4 /* JSNotificationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNotificationCustom.cpp; sourceTree = "<group>"; };
3314ACE910892086000F0E56 /* JSExceptionBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSExceptionBase.cpp; sourceTree = "<group>"; };
3314ACEA10892086000F0E56 /* JSExceptionBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSExceptionBase.h; sourceTree = "<group>"; };
333F704E0FB49CA2008E12A6 /* Notification.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Notification.idl; path = Modules/notifications/Notification.idl; sourceTree = "<group>"; };
BCB773600C17853D00132BA4 /* JSNodeFilterCustom.cpp */,
1A750DD30A90E729000FF215 /* JSNodeIteratorCustom.cpp */,
BCD9C2610C17AA67005C90A2 /* JSNodeListCustom.cpp */,
+ 31FE6E6C1501A3BF0004EBC4 /* JSNotificationCustom.cpp */,
FDBD1DFB167FE27D0051A11E /* JSOscillatorNodeCustom.cpp */,
FD8AA63D169514A700D2EA68 /* JSPannerNodeCustom.cpp */,
A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
65DF31FD09D1CC60000BE325 /* JSNotation.cpp in Sources */,
33503CA310179AD7003B47E1 /* JSNotification.cpp in Sources */,
33503CA510179AD7003B47E1 /* JSNotificationCenter.cpp in Sources */,
+ 31FE6E6D1501A3BF0004EBC4 /* JSNotificationCustom.cpp in Sources */,
31EC1E2814FF60EE00C94662 /* JSNotificationPermissionCallback.cpp in Sources */,
7E46F6FA1627A2CA00062223 /* JSOESElementIndexUint.cpp in Sources */,
9001788012E0370700648462 /* JSOESStandardDerivatives.cpp in Sources */,
--- /dev/null
+/*
+ * Copyright (C) 2012 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(NOTIFICATIONS)
+#include "JSNotification.h"
+
+#include "CallbackFunction.h"
+#include "JSNotificationPermissionCallback.h"
+#include <runtime/Error.h>
+
+using namespace JSC;
+
+namespace WebCore {
+
+JSValue JSNotification::requestPermission(ExecState* exec)
+{
+ // Arguments: NotificationPermissionCallback
+ if (!exec->argument(0).isObject())
+ return throwTypeError(exec);
+
+ RefPtr<NotificationPermissionCallback> callback = createFunctionOnlyCallback<JSNotificationPermissionCallback>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument(0));
+ if (exec->hadException())
+ return jsUndefined();
+
+ ASSERT(callback);
+ ScriptExecutionContext* scriptContext = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
+ Notification::requestPermission(scriptContext, callback.release());
+ return jsUndefined();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(NOTIFICATIONS)
push(@$outputArray, " if (!exec->argument($argsIndex).isFunction())\n");
push(@$outputArray, " return throwVMTypeError(exec);\n");
if ($function->isStatic) {
- AddToImplIncludes("CallbackFunction.h");
push(@$outputArray, " $name = createFunctionOnlyCallback<${callbackClassName}>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument($argsIndex));\n");
} else {
push(@$outputArray, " $name = ${callbackClassName}::create(asObject(exec->argument($argsIndex)), castedThis->globalObject());\n");
push(@$outputArray, " if (exec->argumentCount() <= $argsIndex || !exec->argument($argsIndex).isFunction())\n");
push(@$outputArray, " return throwVMTypeError(exec);\n");
if ($function->isStatic) {
- AddToImplIncludes("CallbackFunction.h");
push(@$outputArray, " RefPtr<$argType> $name = createFunctionOnlyCallback<${callbackClassName}>(exec, static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject()), exec->argument($argsIndex));\n");
} else {
push(@$outputArray, " RefPtr<$argType> $name = ${callbackClassName}::create(asObject(exec->argument($argsIndex)), castedThis->globalObject());\n");
#include "config.h"
#include "JSTestObj.h"
-#include "CallbackFunction.h"
#include "DOMStringList.h"
#include "Dictionary.h"
#include "Document.h"
--- /dev/null
+/*
+ * Copyright (C) 2012 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if ENABLE(NOTIFICATIONS)
+#include "V8Notification.h"
+
+#include "ExceptionCode.h"
+#include "V8Callback.h"
+#include "V8NotificationPermissionCallback.h"
+
+namespace WebCore {
+
+v8::Handle<v8::Value> V8Notification::requestPermissionMethodCustom(const v8::Arguments& args)
+{
+ bool succeeded = false;
+ RefPtr<V8NotificationPermissionCallback> callback = createFunctionOnlyCallback<V8NotificationPermissionCallback>(args[0], succeeded, args.GetIsolate());
+ if (!succeeded)
+ return v8::Undefined();
+ ASSERT(callback);
+
+ Notification::requestPermission(getScriptExecutionContext(), callback.release());
+ return v8::Undefined();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(NOTIFICATIONS)