summaryrefslogtreecommitdiffstats
path: root/gin/runner.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-19 04:33:15 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-19 04:33:15 +0000
commitbe12cc446c38f5d149318e8282dd32b726c02640 (patch)
treec14985510a4a8e5aad43f6a9c4e77e0c8455a9d7 /gin/runner.cc
parent1e70007669ac9740a0b80ba9b337be657c518328 (diff)
downloadchromium_src-be12cc446c38f5d149318e8282dd32b726c02640.zip
chromium_src-be12cc446c38f5d149318e8282dd32b726c02640.tar.gz
chromium_src-be12cc446c38f5d149318e8282dd32b726c02640.tar.bz2
Port Mojo's sample_service.cc to JavaScript
This CL completes the manual implementation of sample_service.js and tests it using sample_test.js, which exactly mirrors the testing of sample_service.cc by sample_service.cc. (I've also moved sample_service.js into mojo/public/bindings/sample/mojom to better mirror the C++ implementation.) BUG=317398 Review URL: https://codereview.chromium.org/68323004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@235917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gin/runner.cc')
-rw-r--r--gin/runner.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/gin/runner.cc b/gin/runner.cc
index a3c9544..46671c5 100644
--- a/gin/runner.cc
+++ b/gin/runner.cc
@@ -57,14 +57,12 @@ void Runner::Run(const std::string& script) {
}
void Runner::Run(v8::Handle<Script> script) {
+ TryCatch try_catch;
delegate_->WillRunScript(this, script);
- {
- TryCatch try_catch;
- script->Run();
- if (try_catch.HasCaught())
- delegate_->UnhandledException(this, try_catch);
- }
+ script->Run();
delegate_->DidRunScript(this, script);
+ if (try_catch.HasCaught())
+ delegate_->UnhandledException(this, try_catch);
}
Runner::Scope::Scope(Runner* runner)