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

Unified Diff: Source/bindings/v8/custom/V8ErrorEventCustom.cpp

Issue 20351002: Add 'error' parameter to 'window.onerror' handlers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Constructor. Created 7 years, 5 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
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/core/dom/ErrorEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8ErrorEventCustom.cpp
diff --git a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp b/Source/bindings/v8/custom/V8ErrorEventCustom.cpp
similarity index 69%
copy from Source/core/page/RuntimeEnabledFeaturesCustom.cpp
copy to Source/bindings/v8/custom/V8ErrorEventCustom.cpp
index 2ac204d2e28b6eb6e2418ed5e635d890715f6b76..42e36973e7422f56fbff1a79fbffb9dc47619945 100644
--- a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp
+++ b/Source/bindings/v8/custom/V8ErrorEventCustom.cpp
@@ -29,15 +29,32 @@
*/
#include "config.h"
-#include "RuntimeEnabledFeatures.h"
+#include "V8ErrorEvent.h"
-#include "core/workers/SharedWorkerRepository.h"
+#include "RuntimeEnabledFeatures.h"
+#include "V8Event.h"
+#include "bindings/v8/DOMWrapperWorld.h"
+#include "bindings/v8/Dictionary.h"
+#include "bindings/v8/ScriptState.h"
+#include "bindings/v8/SerializedScriptValue.h"
+#include "bindings/v8/V8Binding.h"
+#include "bindings/v8/V8DOMWrapper.h"
+#include "bindings/v8/V8HiddenPropertyName.h"
+#include "core/dom/ContextFeatures.h"
+#include "core/page/Frame.h"
namespace WebCore {
-bool RuntimeEnabledFeatures::sharedWorkerEnabled()
+void V8ErrorEvent::errorAttrGetterCustom(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- return SharedWorkerRepository::isAvailable();
+ v8::Handle<v8::Value> error = info.Holder()->GetHiddenValue(V8HiddenPropertyName::error());
+
+ if (!error.IsEmpty()) {
+ v8SetReturnValue(info, error);
+ return;
+ }
+
+ v8SetReturnValueNull(info);
}
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/WorkerScriptController.cpp ('k') | Source/core/dom/ErrorEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698