diff --git a/CefSharp/BindingHandler.cpp b/CefSharp/BindingHandler.cpp index ed2aa53e2..001b50978 100644 --- a/CefSharp/BindingHandler.cpp +++ b/CefSharp/BindingHandler.cpp @@ -251,8 +251,7 @@ namespace CefSharp CefRefPtr userData = static_cast>(bindingData); // create the javascript object and associate the wrapped object - CefRefPtr wrappedObject = window->CreateObject(NULL); - wrappedObject->SetUserData(userData); + CefRefPtr wrappedObject = window->CreateObject(userData, NULL); // build a list of methods on the bound object array^ methods = obj->GetType()->GetMethods(BindingFlags::Instance | BindingFlags::Public); diff --git a/CefSharp/ScriptCore.cpp b/CefSharp/ScriptCore.cpp index 3b49158b2..0602f79aa 100644 --- a/CefSharp/ScriptCore.cpp +++ b/CefSharp/ScriptCore.cpp @@ -36,20 +36,20 @@ namespace CefSharp if (context.get() && context->Enter()) { + CefRefPtr global = context->GetGlobal(); + CefRefPtr eval = global->GetValue("eval"); + CefRefPtr arg = CefV8Value::CreateString(script); CefRefPtr result; CefRefPtr exception; - bool success = context->Eval(script, result, exception); - if (success) + CefV8ValueList args; + args.push_back(arg); + + bool success = eval->ExecuteFunctionWithContext(context, global, args, result, exception, false); + + if (!success) { - try - { - _result = convertFromCef(result); - } - catch (Exception^ ex) - { - _exceptionMessage = ex->Message; - } + _exceptionMessage = "Failed to evaluate script"; } else if (exception.get()) { @@ -57,7 +57,14 @@ namespace CefSharp } else { - _exceptionMessage = "Failed to evaluate script"; + try + { + _result = convertFromCef(result); + } + catch (Exception^ ex) + { + _exceptionMessage = ex->Message; + } } context->Exit(); diff --git a/CefSharp/TypeUtil.cpp b/CefSharp/TypeUtil.cpp index 6e5c9d323..b614f903e 100644 --- a/CefSharp/TypeUtil.cpp +++ b/CefSharp/TypeUtil.cpp @@ -78,7 +78,7 @@ namespace CefSharp if (type->IsArray) { System::Array^ managedArray = (System::Array^)obj; - CefRefPtr cefArray = CefV8Value::CreateArray(managedArray->Length); + CefRefPtr cefArray = CefV8Value::CreateArray(); for (int i = 0; i < managedArray->Length; i++) { @@ -103,7 +103,7 @@ namespace CefSharp if (type->IsValueType && !type->IsPrimitive && !type->IsEnum) { cli::array^ fields = type->GetFields(); - CefRefPtr cefArray = CefV8Value::CreateArray(fields->Length); + CefRefPtr cefArray = CefV8Value::CreateArray(); for (int i = 0; i < fields->Length; i++) { diff --git a/Release/avcodec-54.dll b/Release/avcodec-54.dll index d6df5653d..caab6ec42 100644 Binary files a/Release/avcodec-54.dll and b/Release/avcodec-54.dll differ diff --git a/Release/avformat-54.dll b/Release/avformat-54.dll index ba4d276b4..726688964 100644 Binary files a/Release/avformat-54.dll and b/Release/avformat-54.dll differ diff --git a/Release/avutil-51.dll b/Release/avutil-51.dll index f5fdc2102..1808410e6 100644 Binary files a/Release/avutil-51.dll and b/Release/avutil-51.dll differ diff --git a/Release/chrome.pak b/Release/chrome.pak index 5dfa919b4..a588fc32e 100644 Binary files a/Release/chrome.pak and b/Release/chrome.pak differ diff --git a/Release/libEGL.dll b/Release/libEGL.dll index 7d8be935c..c23577311 100644 Binary files a/Release/libEGL.dll and b/Release/libEGL.dll differ diff --git a/Release/libGLESv2.dll b/Release/libGLESv2.dll index 7c65c0318..71fdc194f 100644 Binary files a/Release/libGLESv2.dll and b/Release/libGLESv2.dll differ diff --git a/Release/libcef.dll b/Release/libcef.dll index 5dd499855..c705d48c6 100644 Binary files a/Release/libcef.dll and b/Release/libcef.dll differ diff --git a/Release/locales/am.pak b/Release/locales/am.pak index ca06b6d37..a8ae926d3 100644 Binary files a/Release/locales/am.pak and b/Release/locales/am.pak differ diff --git a/Release/locales/ar.pak b/Release/locales/ar.pak index a2071c170..6e7281656 100644 Binary files a/Release/locales/ar.pak and b/Release/locales/ar.pak differ diff --git a/Release/locales/bg.pak b/Release/locales/bg.pak index 85265cfa0..37a5f90ba 100644 Binary files a/Release/locales/bg.pak and b/Release/locales/bg.pak differ diff --git a/Release/locales/bn.pak b/Release/locales/bn.pak index 0ce9f3d36..628d832d9 100644 Binary files a/Release/locales/bn.pak and b/Release/locales/bn.pak differ diff --git a/Release/locales/ca.pak b/Release/locales/ca.pak index 7dfbff8f5..b566e04e7 100644 Binary files a/Release/locales/ca.pak and b/Release/locales/ca.pak differ diff --git a/Release/locales/cs.pak b/Release/locales/cs.pak index 1b49cd92b..30a76a550 100644 Binary files a/Release/locales/cs.pak and b/Release/locales/cs.pak differ diff --git a/Release/locales/da.pak b/Release/locales/da.pak index c977945bb..7ffa0b2e2 100644 Binary files a/Release/locales/da.pak and b/Release/locales/da.pak differ diff --git a/Release/locales/de.pak b/Release/locales/de.pak index f265d035b..b9db53838 100644 Binary files a/Release/locales/de.pak and b/Release/locales/de.pak differ diff --git a/Release/locales/el.pak b/Release/locales/el.pak index 5b78ff4f1..548c5b587 100644 Binary files a/Release/locales/el.pak and b/Release/locales/el.pak differ diff --git a/Release/locales/en-GB.pak b/Release/locales/en-GB.pak index 7086ee925..efa8b2ee9 100644 Binary files a/Release/locales/en-GB.pak and b/Release/locales/en-GB.pak differ diff --git a/Release/locales/en-US.pak b/Release/locales/en-US.pak index 80fe1b49b..c4f80ec5c 100644 Binary files a/Release/locales/en-US.pak and b/Release/locales/en-US.pak differ diff --git a/Release/locales/es-419.pak b/Release/locales/es-419.pak index c6a65a567..5968d8000 100644 Binary files a/Release/locales/es-419.pak and b/Release/locales/es-419.pak differ diff --git a/Release/locales/es.pak b/Release/locales/es.pak index 8921ad64f..b2c60141f 100644 Binary files a/Release/locales/es.pak and b/Release/locales/es.pak differ diff --git a/Release/locales/et.pak b/Release/locales/et.pak index 3b9e30f26..da43dae25 100644 Binary files a/Release/locales/et.pak and b/Release/locales/et.pak differ diff --git a/Release/locales/fa.pak b/Release/locales/fa.pak index 057e27c3f..4dfb6ccc6 100644 Binary files a/Release/locales/fa.pak and b/Release/locales/fa.pak differ diff --git a/Release/locales/fi.pak b/Release/locales/fi.pak index 2d709180d..eb64cb33d 100644 Binary files a/Release/locales/fi.pak and b/Release/locales/fi.pak differ diff --git a/Release/locales/fil.pak b/Release/locales/fil.pak index f7861566b..e686ccda6 100644 Binary files a/Release/locales/fil.pak and b/Release/locales/fil.pak differ diff --git a/Release/locales/fr.pak b/Release/locales/fr.pak index 72e92651c..5a17aded4 100644 Binary files a/Release/locales/fr.pak and b/Release/locales/fr.pak differ diff --git a/Release/locales/gu.pak b/Release/locales/gu.pak index e8fef8ea5..ab5487197 100644 Binary files a/Release/locales/gu.pak and b/Release/locales/gu.pak differ diff --git a/Release/locales/he.pak b/Release/locales/he.pak index ecffd0981..660707271 100644 Binary files a/Release/locales/he.pak and b/Release/locales/he.pak differ diff --git a/Release/locales/hi.pak b/Release/locales/hi.pak index 6449b6d04..8f9debf5a 100644 Binary files a/Release/locales/hi.pak and b/Release/locales/hi.pak differ diff --git a/Release/locales/hr.pak b/Release/locales/hr.pak index 162d81b3c..94a1a92e2 100644 Binary files a/Release/locales/hr.pak and b/Release/locales/hr.pak differ diff --git a/Release/locales/hu.pak b/Release/locales/hu.pak index 0aa561911..d160e2bf6 100644 Binary files a/Release/locales/hu.pak and b/Release/locales/hu.pak differ diff --git a/Release/locales/id.pak b/Release/locales/id.pak index 4baf1e896..1a9fce62f 100644 Binary files a/Release/locales/id.pak and b/Release/locales/id.pak differ diff --git a/Release/locales/it.pak b/Release/locales/it.pak index f073d1a1e..bee701216 100644 Binary files a/Release/locales/it.pak and b/Release/locales/it.pak differ diff --git a/Release/locales/ja.pak b/Release/locales/ja.pak index 0b2e1ee33..61067b9af 100644 Binary files a/Release/locales/ja.pak and b/Release/locales/ja.pak differ diff --git a/Release/locales/kn.pak b/Release/locales/kn.pak index a58c3ca43..6fa5a7ef7 100644 Binary files a/Release/locales/kn.pak and b/Release/locales/kn.pak differ diff --git a/Release/locales/ko.pak b/Release/locales/ko.pak index 5ff776b9d..6d2fa5c20 100644 Binary files a/Release/locales/ko.pak and b/Release/locales/ko.pak differ diff --git a/Release/locales/lt.pak b/Release/locales/lt.pak index f28db73f7..3605eb1a5 100644 Binary files a/Release/locales/lt.pak and b/Release/locales/lt.pak differ diff --git a/Release/locales/lv.pak b/Release/locales/lv.pak index afd4efd23..9ca50cbf3 100644 Binary files a/Release/locales/lv.pak and b/Release/locales/lv.pak differ diff --git a/Release/locales/ml.pak b/Release/locales/ml.pak index eb3b91032..ac4e6aff1 100644 Binary files a/Release/locales/ml.pak and b/Release/locales/ml.pak differ diff --git a/Release/locales/mr.pak b/Release/locales/mr.pak index bb43205d6..8b4debea4 100644 Binary files a/Release/locales/mr.pak and b/Release/locales/mr.pak differ diff --git a/Release/locales/ms.pak b/Release/locales/ms.pak index 4486cffe8..eafd3f973 100644 Binary files a/Release/locales/ms.pak and b/Release/locales/ms.pak differ diff --git a/Release/locales/nb.pak b/Release/locales/nb.pak index 270d03a39..9c6b97e98 100644 Binary files a/Release/locales/nb.pak and b/Release/locales/nb.pak differ diff --git a/Release/locales/nl.pak b/Release/locales/nl.pak index 16d3624a5..4987a93dc 100644 Binary files a/Release/locales/nl.pak and b/Release/locales/nl.pak differ diff --git a/Release/locales/pl.pak b/Release/locales/pl.pak index 3f8e80e9b..fcd7a06c9 100644 Binary files a/Release/locales/pl.pak and b/Release/locales/pl.pak differ diff --git a/Release/locales/pt-BR.pak b/Release/locales/pt-BR.pak index 3493e515b..4b9a261d0 100644 Binary files a/Release/locales/pt-BR.pak and b/Release/locales/pt-BR.pak differ diff --git a/Release/locales/pt-PT.pak b/Release/locales/pt-PT.pak index cfec346f4..a295b6efa 100644 Binary files a/Release/locales/pt-PT.pak and b/Release/locales/pt-PT.pak differ diff --git a/Release/locales/ro.pak b/Release/locales/ro.pak index 506f079c7..3a6a394e6 100644 Binary files a/Release/locales/ro.pak and b/Release/locales/ro.pak differ diff --git a/Release/locales/ru.pak b/Release/locales/ru.pak index 638c703f4..9bd59b1b2 100644 Binary files a/Release/locales/ru.pak and b/Release/locales/ru.pak differ diff --git a/Release/locales/sk.pak b/Release/locales/sk.pak index 7911632bf..d0432a100 100644 Binary files a/Release/locales/sk.pak and b/Release/locales/sk.pak differ diff --git a/Release/locales/sl.pak b/Release/locales/sl.pak index 22c439a48..7d32bef34 100644 Binary files a/Release/locales/sl.pak and b/Release/locales/sl.pak differ diff --git a/Release/locales/sr.pak b/Release/locales/sr.pak index 5f74f4b05..e3c674fbf 100644 Binary files a/Release/locales/sr.pak and b/Release/locales/sr.pak differ diff --git a/Release/locales/sv.pak b/Release/locales/sv.pak index da83e8ff2..6984f534c 100644 Binary files a/Release/locales/sv.pak and b/Release/locales/sv.pak differ diff --git a/Release/locales/sw.pak b/Release/locales/sw.pak index 8f133de65..c57fe78f3 100644 Binary files a/Release/locales/sw.pak and b/Release/locales/sw.pak differ diff --git a/Release/locales/ta.pak b/Release/locales/ta.pak index 3c2a99c2d..0c32e0f96 100644 Binary files a/Release/locales/ta.pak and b/Release/locales/ta.pak differ diff --git a/Release/locales/te.pak b/Release/locales/te.pak index be0c8d842..9cb7abbb0 100644 Binary files a/Release/locales/te.pak and b/Release/locales/te.pak differ diff --git a/Release/locales/th.pak b/Release/locales/th.pak index 21d32b32b..eceffbe62 100644 Binary files a/Release/locales/th.pak and b/Release/locales/th.pak differ diff --git a/Release/locales/tr.pak b/Release/locales/tr.pak index 19a9c45d5..27d366b17 100644 Binary files a/Release/locales/tr.pak and b/Release/locales/tr.pak differ diff --git a/Release/locales/uk.pak b/Release/locales/uk.pak index a64647168..c29c1834f 100644 Binary files a/Release/locales/uk.pak and b/Release/locales/uk.pak differ diff --git a/Release/locales/vi.pak b/Release/locales/vi.pak index e738bc4e3..f034ddcf2 100644 Binary files a/Release/locales/vi.pak and b/Release/locales/vi.pak differ diff --git a/Release/locales/zh-CN.pak b/Release/locales/zh-CN.pak index 6ac23b6d5..0e645c03c 100644 Binary files a/Release/locales/zh-CN.pak and b/Release/locales/zh-CN.pak differ diff --git a/Release/locales/zh-TW.pak b/Release/locales/zh-TW.pak index 9b6bbd797..bca2fb532 100644 Binary files a/Release/locales/zh-TW.pak and b/Release/locales/zh-TW.pak differ diff --git a/include/cef_v8.h b/include/cef_v8.h index 70dd729f6..6024ce4a9 100644 --- a/include/cef_v8.h +++ b/include/cef_v8.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -44,9 +44,7 @@ #include "include/cef_frame.h" #include -class CefV8Exception; class CefV8Handler; -class CefV8StackFrame; class CefV8Value; @@ -116,8 +114,7 @@ bool CefRegisterExtension(const CefString& extension_name, /// -// Class that encapsulates a V8 context handle. The methods of this class may -// only be called on the UI thread. +// Class that encapsulates a V8 context handle. /// /*--cef(source=library)--*/ class CefV8Context : public virtual CefBase { @@ -153,18 +150,17 @@ class CefV8Context : public virtual CefBase { virtual CefRefPtr GetFrame() =0; /// - // Returns the global object for this context. The context must be entered - // before calling this method. + // Returns the global object for this context. /// /*--cef()--*/ virtual CefRefPtr GetGlobal() =0; /// // Enter this context. A context must be explicitly entered before creating a - // V8 Object, Array, Function or Date asynchronously. Exit() must be called - // the same number of times as Enter() before releasing this context. V8 - // objects belong to the context in which they are created. Returns true if - // the scope was entered successfully. + // V8 Object, Array or Function asynchronously. Exit() must be called the same + // number of times as Enter() before releasing this context. V8 objects belong + // to the context in which they are created. Returns true if the scope was + // entered successfully. /// /*--cef()--*/ virtual bool Enter() =0; @@ -182,17 +178,6 @@ class CefV8Context : public virtual CefBase { /// /*--cef()--*/ virtual bool IsSame(CefRefPtr that) =0; - - /// - // Evaluates the specified JavaScript code using this context's global object. - // On success |retval| will be set to the return value, if any, and the - // function will return true. On failure |exception| will be set to the - // exception, if any, and the function will return false. - /// - /*--cef()--*/ - virtual bool Eval(const CefString& code, - CefRefPtr& retval, - CefRefPtr& exception) =0; }; @@ -317,8 +302,8 @@ class CefV8Exception : public virtual CefBase { }; /// -// Class representing a V8 value. The methods of this class may only be called -// on the UI thread. +// Class representing a V8 value. The methods of this class should only be +// called on the UI thread. /// /*--cef(source=library)--*/ class CefV8Value : public virtual CefBase { @@ -331,72 +316,55 @@ class CefV8Value : public virtual CefBase { /// /*--cef()--*/ static CefRefPtr CreateUndefined(); - /// // Create a new CefV8Value object of type null. /// /*--cef()--*/ static CefRefPtr CreateNull(); - /// // Create a new CefV8Value object of type bool. /// /*--cef()--*/ static CefRefPtr CreateBool(bool value); - /// // Create a new CefV8Value object of type int. /// /*--cef()--*/ - static CefRefPtr CreateInt(int32 value); - - /// - // Create a new CefV8Value object of type unsigned int. - /// - /*--cef()--*/ - static CefRefPtr CreateUInt(uint32 value); - + static CefRefPtr CreateInt(int value); /// // Create a new CefV8Value object of type double. /// /*--cef()--*/ static CefRefPtr CreateDouble(double value); - /// - // Create a new CefV8Value object of type Date. This method should only be - // called from within the scope of a CefV8ContextHandler, CefV8Handler or - // CefV8Accessor callback, or in combination with calling Enter() and Exit() - // on a stored CefV8Context reference. + // Create a new CefV8Value object of type Date. /// /*--cef()--*/ static CefRefPtr CreateDate(const CefTime& date); - /// // Create a new CefV8Value object of type string. /// /*--cef(optional_param=value)--*/ static CefRefPtr CreateString(const CefString& value); - /// - // Create a new CefV8Value object of type object with optional accessor. This - // method should only be called from within the scope of a + // Create a new CefV8Value object of type object with optional user data and + // accessor. This method should only be called from within the scope of a // CefV8ContextHandler, CefV8Handler or CefV8Accessor callback, or in // combination with calling Enter() and Exit() on a stored CefV8Context // reference. /// - /*--cef(optional_param=accessor)--*/ - static CefRefPtr CreateObject(CefRefPtr accessor); - + /*--cef(capi_name=cef_v8value_create_object_with_accessor, + optional_param=user_data,optional_param=accessor)--*/ + static CefRefPtr CreateObject(CefRefPtr user_data, + CefRefPtr accessor); /// - // Create a new CefV8Value object of type array with the specified |length|. - // If |length| is negative the returned array will have length 0. This method - // should only be called from within the scope of a CefV8ContextHandler, - // CefV8Handler or CefV8Accessor callback, or in combination with calling - // Enter() and Exit() on a stored CefV8Context reference. + // Create a new CefV8Value object of type array. This method should only be + // called from within the scope of a CefV8ContextHandler, CefV8Handler or + // CefV8Accessor callback, or in combination with calling Enter() and Exit() + // on a stored CefV8Context reference. /// /*--cef()--*/ - static CefRefPtr CreateArray(int length); - + static CefRefPtr CreateArray(); /// // Create a new CefV8Value object of type function. This method should only be // called from within the scope of a CefV8ContextHandler, CefV8Handler or @@ -412,61 +380,46 @@ class CefV8Value : public virtual CefBase { /// /*--cef()--*/ virtual bool IsUndefined() =0; - /// // True if the value type is null. /// /*--cef()--*/ virtual bool IsNull() =0; - /// // True if the value type is bool. /// /*--cef()--*/ virtual bool IsBool() =0; - /// // True if the value type is int. /// /*--cef()--*/ virtual bool IsInt() =0; - - /// - // True if the value type is unsigned int. - /// - /*--cef()--*/ - virtual bool IsUInt() =0; - /// // True if the value type is double. /// /*--cef()--*/ virtual bool IsDouble() =0; - /// // True if the value type is Date. /// /*--cef()--*/ virtual bool IsDate() =0; - /// // True if the value type is string. /// /*--cef()--*/ virtual bool IsString() =0; - /// // True if the value type is object. /// /*--cef()--*/ virtual bool IsObject() =0; - /// // True if the value type is array. /// /*--cef()--*/ virtual bool IsArray() =0; - /// // True if the value type is function. /// @@ -486,35 +439,24 @@ class CefV8Value : public virtual CefBase { /// /*--cef()--*/ virtual bool GetBoolValue() =0; - /// // Return an int value. The underlying data will be converted to if // necessary. /// /*--cef()--*/ - virtual int32 GetIntValue() =0; - - /// - // Return an unisgned int value. The underlying data will be converted to if - // necessary. - /// - /*--cef()--*/ - virtual uint32 GetUIntValue() =0; - + virtual int GetIntValue() =0; /// // Return a double value. The underlying data will be converted to if // necessary. /// /*--cef()--*/ virtual double GetDoubleValue() =0; - /// // Return a Date value. The underlying data will be converted to if // necessary. /// /*--cef()--*/ virtual CefTime GetDateValue() =0; - /// // Return a string value. The underlying data will be converted to if // necessary. @@ -527,55 +469,11 @@ class CefV8Value : public virtual CefBase { // functions are also objects. String- and integer-based keys can be used // interchangably with the framework converting between them as necessary. - /// - // Returns true if this is a user created object. - /// - /*--cef()--*/ - virtual bool IsUserCreated() =0; - - /// - // Returns true if the last method call resulted in an exception. This - // attribute exists only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual bool HasException() =0; - - /// - // Returns the exception resulting from the last method call. This attribute - // exists only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual CefRefPtr GetException() =0; - - /// - // Clears the last exception and returns true on success. - /// - /*--cef()--*/ - virtual bool ClearException() =0; - - /// - // Returns true if this object will re-throw future exceptions. This attribute - // exists only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual bool WillRethrowExceptions() =0; - - /// - // Set whether this object will re-throw future exceptions. By default - // exceptions are not re-thrown. If a exception is re-thrown the current - // context should not be accessed again until after the exception has been - // caught and not re-thrown. Returns true on success. This attribute exists - // only in the scope of the current CEF value object. - /// - /*--cef()--*/ - virtual bool SetRethrowExceptions(bool rethrow) =0; - /// // Returns true if the object has a value with the specified identifier. /// /*--cef(capi_name=has_value_bykey)--*/ virtual bool HasValue(const CefString& key) =0; - /// // Returns true if the object has a value with the specified identifier. /// @@ -583,62 +481,42 @@ class CefV8Value : public virtual CefBase { virtual bool HasValue(int index) =0; /// - // Deletes the value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly or an exception - // is thrown. For read-only and don't-delete values this method will return - // true even though deletion failed. + // Delete the value with the specified identifier. /// /*--cef(capi_name=delete_value_bykey)--*/ virtual bool DeleteValue(const CefString& key) =0; - /// - // Deletes the value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly, deletion fails - // or an exception is thrown. For read-only and don't-delete values this - // method will return true even though deletion failed. + // Delete the value with the specified identifier. /// /*--cef(capi_name=delete_value_byindex,index_param=index)--*/ virtual bool DeleteValue(int index) =0; /// - // Returns the value with the specified identifier on success. Returns NULL - // if this method is called incorrectly or an exception is thrown. + // Returns the value with the specified identifier. /// /*--cef(capi_name=get_value_bykey)--*/ virtual CefRefPtr GetValue(const CefString& key) =0; - /// - // Returns the value with the specified identifier on success. Returns NULL - // if this method is called incorrectly or an exception is thrown. + // Returns the value with the specified identifier. /// /*--cef(capi_name=get_value_byindex,index_param=index)--*/ virtual CefRefPtr GetValue(int index) =0; /// - // Associates a value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly or an exception - // is thrown. For read-only values this method will return true even though - // assignment failed. + // Associate a value with the specified identifier. /// /*--cef(capi_name=set_value_bykey)--*/ virtual bool SetValue(const CefString& key, CefRefPtr value, PropertyAttribute attribute) =0; - /// - // Associates a value with the specified identifier and returns true on - // success. Returns false if this method is called incorrectly or an exception - // is thrown. For read-only values this method will return true even though - // assignment failed. + // Associate a value with the specified identifier. /// /*--cef(capi_name=set_value_byindex,index_param=index)--*/ virtual bool SetValue(int index, CefRefPtr value) =0; /// - // Registers an identifier and returns true on success. Access to the - // identifier will be forwarded to the CefV8Accessor instance passed to - // CefV8Value::CreateObject(). Returns false if this method is called - // incorrectly or an exception is thrown. For read-only values this method - // will return true even though assignment failed. + // Register an identifier whose access will be forwarded to the CefV8Accessor + // instance passed to CefV8Value::CreateObject(). /// /*--cef(capi_name=set_value_byaccessor)--*/ virtual bool SetValue(const CefString& key, AccessControl settings, @@ -652,15 +530,7 @@ class CefV8Value : public virtual CefBase { virtual bool GetKeys(std::vector& keys) =0; /// - // Sets the user data for this object and returns true on success. Returns - // false if this method is called incorrectly. This method can only be called - // on user created objects. - /// - /*--cef(optional_param=user_data)--*/ - virtual bool SetUserData(CefRefPtr user_data) =0; - - /// - // Returns the user data, if any, assigned to this object. + // Returns the user data, if any, specified when the object was created. /// /*--cef()--*/ virtual CefRefPtr GetUserData() =0; @@ -680,8 +550,7 @@ class CefV8Value : public virtual CefBase { // external memory associated with it and automatically decreases the global // total by the appropriate amount on its destruction. |change_in_bytes| // specifies the number of bytes to adjust by. This method returns the number - // of bytes associated with the object after the adjustment. This method can - // only be called on user created objects. + // of bytes associated with the object after the adjustment. /// /*--cef()--*/ virtual int AdjustExternallyAllocatedMemory(int change_in_bytes) =0; @@ -715,109 +584,35 @@ class CefV8Value : public virtual CefBase { // be called from within the scope of a CefV8Handler or CefV8Accessor // callback, or in combination with calling Enter() and Exit() on a stored // CefV8Context reference. |object| is the receiver ('this' object) of the - // function. If |object| is empty the current context's global object will be - // used. |arguments| is the list of arguments that will be passed to the - // function. Returns the function return value on success. Returns NULL if - // this method is called incorrectly or an exception is thrown. + // function. |arguments| is the list of arguments that will be passed to the + // function. If execution succeeds |retval| will be set to the function return + // value. If execution fails |exception| will be set to the exception that was + // thrown. If |rethrow_exception| is true any exception will also be re- + // thrown. This method returns false if called incorrectly. /// /*--cef(optional_param=object)--*/ - virtual CefRefPtr ExecuteFunction( - CefRefPtr object, - const CefV8ValueList& arguments) =0; + virtual bool ExecuteFunction(CefRefPtr object, + const CefV8ValueList& arguments, + CefRefPtr& retval, + CefRefPtr& exception, + bool rethrow_exception) =0; /// // Execute the function using the specified V8 context. |object| is the - // receiver ('this' object) of the function. If |object| is empty the - // specified context's global object will be used. |arguments| is the list of - // arguments that will be passed to the function. Returns the function return - // value on success. Returns NULL if this method is called incorrectly or an - // exception is thrown. + // receiver ('this' object) of the function. |arguments| is the list of + // arguments that will be passed to the function. If execution succeeds + // |retval| will be set to the function return value. If execution fails + // |exception| will be set to the exception that was thrown. If + // |rethrow_exception| is true any exception will also be re-thrown. This + // method returns false if called incorrectly. /// /*--cef(optional_param=object)--*/ - virtual CefRefPtr ExecuteFunctionWithContext( - CefRefPtr context, - CefRefPtr object, - const CefV8ValueList& arguments) =0; -}; - -/// -// Class representing a V8 stack trace. The methods of this class may only be -// called on the UI thread. -/// -/*--cef(source=library)--*/ -class CefV8StackTrace : public virtual CefBase { - public: - /// - // Returns the stack trace for the currently active context. |frame_limit| is - // the maximum number of frames that will be captured. - /// - /*--cef()--*/ - static CefRefPtr GetCurrent(int frame_limit); - - /// - // Returns the number of stack frames. - /// - /*--cef()--*/ - virtual int GetFrameCount() =0; - - /// - // Returns the stack frame at the specified 0-based index. - /// - /*--cef()--*/ - virtual CefRefPtr GetFrame(int index) =0; -}; - -/// -// Class representing a V8 stack frame. The methods of this class may only be -// called on the UI thread. -/// -/*--cef(source=library)--*/ -class CefV8StackFrame : public virtual CefBase { - public: - /// - // Returns the name of the resource script that contains the function. - /// - /*--cef()--*/ - virtual CefString GetScriptName() =0; - - /// - // Returns the name of the resource script that contains the function or the - // sourceURL value if the script name is undefined and its source ends with - // a "//@ sourceURL=..." string. - /// - /*--cef()--*/ - virtual CefString GetScriptNameOrSourceURL() =0; - - /// - // Returns the name of the function. - /// - /*--cef()--*/ - virtual CefString GetFunctionName() =0; - - /// - // Returns the 1-based line number for the function call or 0 if unknown. - /// - /*--cef()--*/ - virtual int GetLineNumber() =0; - - /// - // Returns the 1-based column offset on the line for the function call or 0 if - // unknown. - /// - /*--cef()--*/ - virtual int GetColumn() =0; - - /// - // Returns true if the function was compiled using eval(). - /// - /*--cef()--*/ - virtual bool IsEval() =0; - - /// - // Returns true if the function was called as a constructor via "new". - /// - /*--cef()--*/ - virtual bool IsConstructor() =0; + virtual bool ExecuteFunctionWithContext(CefRefPtr context, + CefRefPtr object, + const CefV8ValueList& arguments, + CefRefPtr& retval, + CefRefPtr& exception, + bool rethrow_exception) =0; }; #endif // CEF_INCLUDE_CEF_V8_H_ diff --git a/include/cef_version.h b/include/cef_version.h index b42b82f73..cffcacb3c 100644 --- a/include/cef_version.h +++ b/include/cef_version.h @@ -38,10 +38,10 @@ #define CEF_REVISION 728 #define COPYRIGHT_YEAR 2012 -#define CHROME_VERSION_MAJOR 21 +#define CHROME_VERSION_MAJOR 19 #define CHROME_VERSION_MINOR 0 -#define CHROME_VERSION_BUILD 1180 -#define CHROME_VERSION_PATCH 0 +#define CHROME_VERSION_BUILD 1084 +#define CHROME_VERSION_PATCH 9 #define DO_MAKE_STRING(p) #p #define MAKE_STRING(p) DO_MAKE_STRING(p) diff --git a/include/internal/cef_time.h b/include/internal/cef_time.h index ccaf19320..5d38cf7bc 100644 --- a/include/internal/cef_time.h +++ b/include/internal/cef_time.h @@ -44,7 +44,9 @@ extern "C" { typedef struct _cef_time_t { int year; // Four digit year "2007" int month; // 1-based month (values 1 = January, etc.) +#if !defined(OS_MACOSX) int day_of_week; // 0-based day of week (0 = Sunday, etc.) +#endif int day_of_month; // 1-based day of month (1-31) int hour; // Hour within the current day (0-23) int minute; // Minute within the current hour (0-59) diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index f2ee43852..2e11a20ae 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -61,20 +61,6 @@ typedef long long int64; // NOLINT(runtime/int) typedef unsigned long long uint64; // NOLINT(runtime/int) #endif -// TODO: Remove these type guards. These are to avoid conflicts with -// obsolete/protypes.h in the Gecko SDK. -#ifndef _INT32 -#define _INT32 -typedef int int32; -#endif - -// TODO: Remove these type guards. These are to avoid conflicts with -// obsolete/protypes.h in the Gecko SDK. -#ifndef _UINT32 -#define _UINT32 -typedef unsigned int uint32; -#endif - #ifdef __cplusplus extern "C" { #endif diff --git a/libs/Release/libcef.lib b/libs/Release/libcef.lib index c05d0a789..68ec95891 100644 Binary files a/libs/Release/libcef.lib and b/libs/Release/libcef.lib differ diff --git a/libs/Release/libcef_dll_wrapper.lib b/libs/Release/libcef_dll_wrapper.lib index 25c38eb28..38f6616bd 100644 Binary files a/libs/Release/libcef_dll_wrapper.lib and b/libs/Release/libcef_dll_wrapper.lib differ