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

Side by Side Diff: Source/bindings/v8/V8Binding.cpp

Issue 68563003: Create DOM exceptions in the correct context. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased onto df9a982fbe97 Created 7 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « Source/bindings/v8/ExceptionStatePlaceholder.cpp ('k') | Source/bindings/v8/V8Initializer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "wtf/text/AtomicString.h" 60 #include "wtf/text/AtomicString.h"
61 #include "wtf/text/CString.h" 61 #include "wtf/text/CString.h"
62 #include "wtf/text/StringBuffer.h" 62 #include "wtf/text/StringBuffer.h"
63 #include "wtf/text/StringHash.h" 63 #include "wtf/text/StringHash.h"
64 #include "wtf/text/WTFString.h" 64 #include "wtf/text/WTFString.h"
65 65
66 namespace WebCore { 66 namespace WebCore {
67 67
68 v8::Handle<v8::Value> setDOMException(int exceptionCode, v8::Isolate* isolate) 68 v8::Handle<v8::Value> setDOMException(int exceptionCode, v8::Isolate* isolate)
69 { 69 {
70 return V8ThrowException::throwDOMException(exceptionCode, isolate); 70 // FIXME: pass in an ExceptionState instead for better creationContext.
71 return V8ThrowException::throwDOMException(exceptionCode, v8::Handle<v8::Obj ect>(), isolate);
71 } 72 }
72 73
73 v8::Handle<v8::Value> setDOMException(int exceptionCode, const String& message, v8::Isolate* isolate) 74 v8::Handle<v8::Value> setDOMException(int exceptionCode, const String& message, v8::Isolate* isolate)
74 { 75 {
75 return V8ThrowException::throwDOMException(exceptionCode, message, isolate); 76 return V8ThrowException::throwDOMException(exceptionCode, message, v8::Handl e<v8::Object>(), isolate);
76 } 77 }
77 78
78 v8::Handle<v8::Value> throwError(V8ErrorType errorType, const String& message, v 8::Isolate* isolate) 79 v8::Handle<v8::Value> throwError(V8ErrorType errorType, const String& message, v 8::Isolate* isolate)
79 { 80 {
80 return V8ThrowException::throwError(errorType, message, isolate); 81 return V8ThrowException::throwError(errorType, message, isolate);
81 } 82 }
82 83
83 v8::Handle<v8::Value> throwError(v8::Handle<v8::Value> exception, v8::Isolate* i solate) 84 v8::Handle<v8::Value> throwError(v8::Handle<v8::Value> exception, v8::Isolate* i solate)
84 { 85 {
85 return V8ThrowException::throwError(exception, isolate); 86 return V8ThrowException::throwError(exception, isolate);
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 return mainThreadIsolate(); 619 return mainThreadIsolate();
619 return v8::Isolate::GetCurrent(); 620 return v8::Isolate::GetCurrent();
620 } 621 }
621 622
622 v8::Isolate* toIsolate(Frame* frame) 623 v8::Isolate* toIsolate(Frame* frame)
623 { 624 {
624 return frame->script().isolate(); 625 return frame->script().isolate();
625 } 626 }
626 627
627 } // namespace WebCore 628 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/ExceptionStatePlaceholder.cpp ('k') | Source/bindings/v8/V8Initializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698