Title: [128124] trunk/Source/WebCore
- Revision
- 128124
- Author
- [email protected]
- Date
- 2012-09-10 16:21:53 -0700 (Mon, 10 Sep 2012)
Log Message
[V8] currentDocument doesn't need to handle the case where there is no v8::Context
https://bugs.webkit.org/show_bug.cgi?id=96312
Patch by Adam Barth <[email protected]> on 2012-09-10
Reviewed by Eric Seidel.
This function is always called while V8 is on the stack. It doesn't
need to handle this impossible error condition.
* bindings/v8/BindingState.cpp:
(WebCore::currentDocument):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (128123 => 128124)
--- trunk/Source/WebCore/ChangeLog 2012-09-10 23:21:37 UTC (rev 128123)
+++ trunk/Source/WebCore/ChangeLog 2012-09-10 23:21:53 UTC (rev 128124)
@@ -1,5 +1,18 @@
2012-09-10 Adam Barth <[email protected]>
+ [V8] currentDocument doesn't need to handle the case where there is no v8::Context
+ https://bugs.webkit.org/show_bug.cgi?id=96312
+
+ Reviewed by Eric Seidel.
+
+ This function is always called while V8 is on the stack. It doesn't
+ need to handle this impossible error condition.
+
+ * bindings/v8/BindingState.cpp:
+ (WebCore::currentDocument):
+
+2012-09-10 Adam Barth <[email protected]>
+
[V8] Inline firstFrame and currentFrame into their unique callers
https://bugs.webkit.org/show_bug.cgi?id=96309
Modified: trunk/Source/WebCore/bindings/v8/BindingState.cpp (128123 => 128124)
--- trunk/Source/WebCore/bindings/v8/BindingState.cpp 2012-09-10 23:21:37 UTC (rev 128123)
+++ trunk/Source/WebCore/bindings/v8/BindingState.cpp 2012-09-10 23:21:53 UTC (rev 128124)
@@ -68,10 +68,7 @@
Document* currentDocument(BindingState*)
{
- DOMWindow* current = toDOMWindow(v8::Context::GetCurrent());
- if (!current)
- return 0;
- return current->document();
+ return toDOMWindow(v8::Context::GetCurrent())->document();
}
void printErrorMessageForFrame(Frame* frame, const String& message)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes