Changes between Version 1 and Version 3 of Ticket #6526


Ignore:
Timestamp:
03/28/2018 08:31:09 AM (19 months ago)
Author:
sergz
Comment:

I would like to get your opinion especially regarding the dealing with the maybevalues in our code.

In order to get compiler warnings and errors one can add

  'defines': [
    'V8_DEPRECATION_WARNINGS',
    'V8_IMMINENT_DEPRECATION_WARNINGS'
  ],

to 'target_defaults' in common.gypi and compile our code with prebuilt V8.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6526

    • Property Cc rjeschke hfiguiere added
  • Ticket #6526 – Description

    v1 v3  
    44=== What to change === 
    55The list of API 
    6 - `v8::TryCatch` should accept `v8::Isolate` 
    7 - `v8::Isolate::IdleNotification` is renamed to `v8::Isolate::IdleNotitifcationDeadline` 
     6- [done] `v8::TryCatch` should accept `v8::Isolate` 
     7- [done] `v8::Isolate::IdleNotification` is renamed to `v8::Isolate::IdleNotitifcationDeadline` 
    88- look into `v8::Script::Compile`, related #6448 
     9- [review] use `v8::Local` instead of `v8::Handle` 
     10- [question is below] use v8 functions which return ''maybe'' values, e.g. 
     11 - `v8::Value::IntegerValue` 
     12 - `v8::FunctionTemplate::GetFunction` 
     13 - `v8::String::NewFromUtf8` 
     14 - `v8::Value::BooleanValue` 
     15 - `v8::Object::Get(uint32_t)` 
     16 - `v8::Object::GetOwnPropertyNames` 
     17 - `v8::Function::Call` 
     18 - `v8::Message::GetLineNumber` 
     19 - etc 
     20- those ''maybe'' functions accept `v8::Context`, therefore we need to carefully check that we pass the correct context. Perhaps in the callbacks we should rather use `v8::Isolate::GetCurrentContext` instead of obtaining it from `JsEngine`. Additionally pay attention to `JsContext` which works with the context too. 
    921- to be continued ... 
     22 
     23Here we need to decide regarding the behavior if there is no value in ''maybe''value. The options are basically either to use an artificial default value, crash or propagate such resembling monadic approach to our API. 
  • Ticket #6526 – Review URL(s)

    v1 v3  
    11https://codereview.adblockplus.org/29734562/ 
     2https://codereview.adblockplus.org/29735555/