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

Side by Side Diff: webkit/port/bridge/ScriptControllerV8.cpp

Issue 4097: Implement better JS exception handling by abstracting KJS::ExecState into an ... (Closed) Base URL: svn://chrome-svn/chrome/branches/chrome_webkit_merge_branch/
Patch Set: '' Created 12 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/port/bridge/ExceptionContextV8.cpp ('k') | webkit/port/dom/Document.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008, Google Inc. 1 // Copyright (c) 2008, Google Inc.
2 // All rights reserved. 2 // 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 void ScriptController::gcProtectJSWrapper(void* dom_object) 100 void ScriptController::gcProtectJSWrapper(void* dom_object)
101 { 101 {
102 V8Proxy::GCProtect(static_cast<Peerable*>(dom_object)); 102 V8Proxy::GCProtect(static_cast<Peerable*>(dom_object));
103 } 103 }
104 104
105 void ScriptController::gcUnprotectJSWrapper(void* dom_object) 105 void ScriptController::gcUnprotectJSWrapper(void* dom_object)
106 { 106 {
107 V8Proxy::GCUnprotect(static_cast<Peerable*>(dom_object)); 107 V8Proxy::GCUnprotect(static_cast<Peerable*>(dom_object));
108 } 108 }
109 109
110 JSException ScriptController::NoException()
111 {
112 return v8::Local<v8::Value>();
113 }
114
115 bool ScriptController::IsException(JSException exception)
116 {
117 return !exception.IsEmpty();
118 }
119
120 void ScriptController::pauseTimeouts(OwnPtr<PausedTimeouts>& result) 110 void ScriptController::pauseTimeouts(OwnPtr<PausedTimeouts>& result)
121 { 111 {
122 DOMWindow* window = m_frame->domWindow(); 112 DOMWindow* window = m_frame->domWindow();
123 if (!window) { 113 if (!window) {
124 result.clear(); 114 result.clear();
125 return; 115 return;
126 } 116 }
127 window->pauseTimeouts(result); 117 window->pauseTimeouts(result);
128 } 118 }
129 119
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 v8::Persistent<v8::Object> handle = 579 v8::Persistent<v8::Object> handle =
590 v8::Persistent<v8::Object>::New(instance); 580 v8::Persistent<v8::Object>::New(instance);
591 m_instance = handle; 581 m_instance = handle;
592 #ifndef NDEBUG 582 #ifndef NDEBUG
593 V8Proxy::RegisterGlobalHandle(JSINSTANCE, this, handle); 583 V8Proxy::RegisterGlobalHandle(JSINSTANCE, this, handle);
594 #endif 584 #endif
595 return *this; 585 return *this;
596 } 586 }
597 587
598 } // namespace WebCpre 588 } // namespace WebCpre
OLDNEW
« no previous file with comments | « webkit/port/bridge/ExceptionContextV8.cpp ('k') | webkit/port/dom/Document.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698