| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |