Index: Source/bindings/v8/custom/V8ErrorEventCustom.cpp |
diff --git a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp b/Source/bindings/v8/custom/V8ErrorEventCustom.cpp |
similarity index 65% |
copy from Source/core/page/RuntimeEnabledFeaturesCustom.cpp |
copy to Source/bindings/v8/custom/V8ErrorEventCustom.cpp |
index 2ac204d2e28b6eb6e2418ed5e635d890715f6b76..8b09b70923e28d4fbb0b694617ec2deba45626f6 100644 |
--- a/Source/core/page/RuntimeEnabledFeaturesCustom.cpp |
+++ b/Source/bindings/v8/custom/V8ErrorEventCustom.cpp |
@@ -29,15 +29,33 @@ |
*/ |
#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(); |
+ ErrorEvent* event = V8ErrorEvent::toNative(info.Holder()); |
+ v8::Handle<v8::Object> error = event->error().v8Value()->ToObject(); |
+ |
+ if (DOMWrapperWorld::current()->worldId() != error->GetHiddenValue(V8HiddenPropertyName::worldId())->IntegerValue()) { |
+ v8SetReturnValue(info, v8::Null(info.GetIsolate())); |
+ return; |
+ } |
+ |
+ v8SetReturnValue(info, error); |
} |
} // namespace WebCore |