| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-2011 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 v8SetReturnValueStringOrUndefined(info, host->storageIdImpl(storage)
, info.GetIsolate()); | 334 v8SetReturnValueStringOrUndefined(info, host->storageIdImpl(storage)
, info.GetIsolate()); |
| 335 return; | 335 return; |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 } | 338 } |
| 339 | 339 |
| 340 void V8InjectedScriptHost::evaluateMethodCustom(const v8::FunctionCallbackInfo<v
8::Value>& info) | 340 void V8InjectedScriptHost::evaluateMethodCustom(const v8::FunctionCallbackInfo<v
8::Value>& info) |
| 341 { | 341 { |
| 342 v8::Isolate* isolate = info.GetIsolate(); | 342 v8::Isolate* isolate = info.GetIsolate(); |
| 343 if (info.Length() < 1) { | 343 if (info.Length() < 1) { |
| 344 isolate->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(iso
late, "One argument expected."))); | 344 isolate->ThrowException(v8::Exception::Error(v8AtomicString(isolate, "On
e argument expected."))); |
| 345 return; | 345 return; |
| 346 } | 346 } |
| 347 | 347 |
| 348 v8::Handle<v8::String> expression = info[0]->ToString(); | 348 v8::Handle<v8::String> expression = info[0]->ToString(); |
| 349 if (expression.IsEmpty()) { | 349 if (expression.IsEmpty()) { |
| 350 isolate->ThrowException(v8::Exception::Error(v8::String::NewFromUtf8(iso
late, "The argument must be a string."))); | 350 isolate->ThrowException(v8::Exception::Error(v8AtomicString(isolate, "Th
e argument must be a string."))); |
| 351 return; | 351 return; |
| 352 } | 352 } |
| 353 | 353 |
| 354 ASSERT(!isolate->GetCurrentContext().IsEmpty()); | 354 ASSERT(!isolate->GetCurrentContext().IsEmpty()); |
| 355 v8::TryCatch tryCatch; | 355 v8::TryCatch tryCatch; |
| 356 v8::Handle<v8::Value> result = V8ScriptRunner::compileAndRunInternalScript(e
xpression, info.GetIsolate()); | 356 v8::Handle<v8::Value> result = V8ScriptRunner::compileAndRunInternalScript(e
xpression, info.GetIsolate()); |
| 357 if (tryCatch.HasCaught()) { | 357 if (tryCatch.HasCaught()) { |
| 358 v8SetReturnValue(info, tryCatch.ReThrow()); | 358 v8SetReturnValue(info, tryCatch.ReThrow()); |
| 359 return; | 359 return; |
| 360 } | 360 } |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 int lineNumber; | 439 int lineNumber; |
| 440 int columnNumber; | 440 int columnNumber; |
| 441 if (!getFunctionLocation(info, &scriptId, &lineNumber, &columnNumber)) | 441 if (!getFunctionLocation(info, &scriptId, &lineNumber, &columnNumber)) |
| 442 return; | 442 return; |
| 443 | 443 |
| 444 InjectedScriptHost* host = V8InjectedScriptHost::toNative(info.Holder()); | 444 InjectedScriptHost* host = V8InjectedScriptHost::toNative(info.Holder()); |
| 445 host->unmonitorFunction(scriptId, lineNumber, columnNumber); | 445 host->unmonitorFunction(scriptId, lineNumber, columnNumber); |
| 446 } | 446 } |
| 447 | 447 |
| 448 } // namespace WebCore | 448 } // namespace WebCore |
| OLD | NEW |